<html>
<head> 
  <meta charset="UTF-8"> 
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>
<body>
<script type="text/javascript">
	//源代码在 https://gitee.com/mail_osc/translate
if("object"==typeof translate&&"string"==typeof translate.version)throw new Error("translate.js 已经加载过一次了，当前是重复加载，避免你的翻译出现异常，已帮你拦截此次加载。本信息只是给你一个提示，你可以检查一下你的项目中是否出现了重复引入 translate.js ，当然，这个异常并不会影响到你的具体使用，它已经自动帮你处理拦截了这个异常，只不过提示出来是让你知道，你的代码里出现了重复引入的情况。");var translate={version:"3.18.9.20250828",useVersion:"v2",setUseVersion2:function(){translate.useVersion="v2",console.log("提示：自 v2.10 之后的版本默认就是使用V2版本（当前版本为:"+translate.version+"）， translate.setUseVersion2() 可以不用再加这一行了。当然加了也无所谓，只是加了跟不加是完全一样的。")},translate:null,includedLanguages:"zh-CN,zh-TW,en",resourcesUrl:"//res.zvo.cn/translate",selectLanguageTag:{documentId:"translate",show:!0,languages:"",alreadyRender:!1,selectOnChange:function(e){var t=e.target.value;translate.changeLanguage(t)},refreshRender:function(){let e=document.getElementById(translate.selectLanguageTag.documentId+"SelectLanguage");e&&e.parentNode.removeChild(e),translate.selectLanguageTag.alreadyRender=!1,translate.selectLanguageTag.render()},customUI:function(e){var t=function(e){translate.selectLanguageTag.selectOnChange(e)},a=document.createElement("select");a.id=translate.selectLanguageTag.documentId+"SelectLanguage",a.className=translate.selectLanguageTag.documentId+"SelectLanguage";for(var n=translate.language.getCurrent(),r=0;r<e.length;r++){var s=document.createElement("option");if(s.setAttribute("value",e[r].id),translate.selectLanguageTag.languages.length>0)if((","+translate.selectLanguageTag.languages+",").toLowerCase().indexOf(","+e[r].id.toLowerCase()+",")<0)continue;null!=n&&void 0!==n&&n.length>0?n==e[r].id&&s.setAttribute("selected","selected"):e[r].id==translate.language.getLocal()&&s.setAttribute("selected","selected"),s.appendChild(document.createTextNode(e[r].name)),a.appendChild(s)}window.addEventListener?a.addEventListener("change",t,!1):a.attachEvent("onchange",t),document.getElementById(translate.selectLanguageTag.documentId).appendChild(a)},render:function(){if(!translate.selectLanguageTag.alreadyRender&&(translate.selectLanguageTag.alreadyRender=!0,translate.selectLanguageTag.show)){if(null==document.getElementById(translate.selectLanguageTag.documentId)){var e=document.getElementsByTagName("body");if(0==e.length)return void console.log("body tag not find, translate.selectLanguageTag.render() is not show Select Language");var t=e[0],a=document.createElement("div");a.id=translate.selectLanguageTag.documentId,t.appendChild(a)}else if(null!=document.getElementById(translate.selectLanguageTag.documentId+"SelectLanguage"))return;"string"==typeof translate.request.api.language&&translate.request.api.language.length>0?translate.request.post(translate.request.api.language,{},function(e){0!=e.result?translate.selectLanguageTag.customUI(e.list):console.log("load language list error : "+e.info)},null):"object"==typeof translate.request.api.language&&translate.selectLanguageTag.customUI(translate.request.api.language)}}},localLanguage:"zh-CN",googleTranslateElementInit:function(){var e="";null!=document.getElementById("translate")&&(e="translate"),translate.translate=new google.translate.TranslateElement({pageLanguage:"zh-CN",includedLanguages:translate.selectLanguageTag.languages,layout:0},e)},execute_v1:function(){console.log("=====ERROR======"),console.log("The v1 version has been discontinued since 2022. Please use the latest V3 version and refer to: http://translate.zvo.cn/41162.html")},setCookie:function(e,t){var a=e+"="+escape(t);document.cookie=a},getCookie:function(e){for(var t=document.cookie.split("; "),a=0;a<t.length;a++){var n=t[a].split("=");if(n[0]==e)return unescape(n[1])}return""},currentLanguage:function(){var e=translate.getCookie("googtrans");return e.length>0?e.substr(e.lastIndexOf("/")+1,e.length-1):translate.localLanguage},changeLanguage:function(e){if(",en,de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr,".indexOf(","+e+",")>-1){console.log("您使用的是v1版本的切换语种方式，v1已在2021年就以废弃，请更换为v2，参考文档： http://translate.zvo.cn/41549.html"),translate.check();var t="/"+translate.localLanguage+"/"+e,a=document.location.host.split(".");if(a.length>2){var n=a[a.length-2]+"."+a[a.length-1];document.cookie="googtrans=;expires="+new Date(1)+";domain="+n+";path=/",document.cookie="googtrans="+t+";domain="+n+";path=/"}return translate.setCookie("googtrans",""+t),void translate.refreshCurrentPage()}if(translate.useVersion="v2",null!=translate.to&&translate.to.length>0&&translate.to!=translate.language.getLocal())var r=!0;translate.to=e,translate.storage.set("to",e);try{window.self!==window.top&&"object"==typeof window.parent.translate&&"string"==typeof window.parent.translate.version&&window.parent.translate.language.getCurrent()!=e&&window.parent.translate.changeLanguage(e)}catch(e){console.log(e)}if(r)location.reload();else{translate.execute();const t=document.querySelectorAll("iframe");for(let a=0;a<t.length;a++){const n=t[a].contentWindow;try{"object"==typeof n.translate&&"string"==typeof n.translate.version&&n.translate.to!=e&&(n.translate.to=e,n.translate.storage.set("to",e),n.translate.execute())}catch(e){console.log(e)}}}1==translate.listener.use&&0==translate.listener.isStart&&void 0!==translate.listener.start&&translate.listener.start()},check:function(){"file:"==window.location.protocol&&console.log("\r\n---WARNING----\r\ntranslate.js 主动翻译组件自检异常，当前协议是file协议，翻译组件要在正常的线上http、https协议下才能正常使用翻译功能\r\n------------")},to:"",autoDiscriminateLocalLanguage:!1,documents:[],inProgressNodes:[],ignore:{tag:["style","script","link","pre","code"],class:["ignore","translateSelectLanguage"],id:[],isIgnore:function(e){if(null==e||void 0===e)return!1;for(var t=e,a=100;a-- >0;){if(null==t||void 0===t)return!1;var n=translate.element.getNodeName(t).toLowerCase();if(n.length>0){if("body"==n||"html"==n||"#document"==n)return!1;if(translate.ignore.tag.indexOf(n)>-1)return!0}if(null!=t.className){var r=t.className;if(null==r||"string"!=typeof r)continue;r=r.trim().split(" ");for(var s=0;s<r.length;s++)if(null!=r[s]&&r[s].trim().length>0&&translate.ignore.class.indexOf(r[s])>-1)return!0}if(null!=t.id&&void 0!==t.id&&translate.ignore.id.indexOf(t.id)>-1)return!0;t=t.parentNode}return!1},text:[],textRegex:[],setTextRegexs:function(e){if(!Array.isArray(e))throw new Error("参数必须为数组");for(let t=0;t<e.length;t++)if(!(e[t]instanceof RegExp))throw new Error("第"+t+"项不是RegExp对象");this.textRegex=this.textRegex.concat(e)}},refreshCurrentPage:function(){location.reload()},nomenclature:{data:new Array,old_Data:[],set:function(e){alert("请将 translate.nomenclature.set 更换为 append，具体使用可参考： https://github.com/xnx3/translate ")},append:function(e,t,a){void 0===translate.nomenclature.data[e]&&(translate.nomenclature.data[e]=new Array),void 0===translate.nomenclature.data[e][t]&&(translate.nomenclature.data[e][t]=new Array);for(var n=a.split("\n"),r=0;r<n.length;r++){var s=n[r].trim();if(!(s.length<1)){var l=s.split("=");if(2==l.length){var o=l[0].trim(),i=l[1].trim();0!=o.length&&0!=i.length&&(translate.nomenclature.data[e][t][o]=i)}}}translate.nomenclature.data[e][t]=translate.util.objSort(translate.nomenclature.data[e][t])},get:function(){return translate.nomenclature.data},dispose:function(e){if(null==e||0==e.length)return e;if(void 0===translate.nomenclature.data[translate.language.getLocal()]||void 0===translate.nomenclature.data[translate.language.getLocal()][translate.to])return e;for(var t in translate.nomenclature.data[translate.language.getLocal()][translate.to])if(translate.nomenclature.data[translate.language.getLocal()][translate.to].hasOwnProperty(t)){var a=translate.nomenclature.data[translate.language.getLocal()][translate.to][t];if("function"!=typeof a){var n=e.indexOf(t);if(n>-1)if("english"==translate.language.getLocal()){var r="";if(0==n);else if(r=e.substr(n-1,1),"english"==(s=translate.language.getCharLanguage(r))||"romance"==s)continue;var s,l="";if(n+t.length==e.length);else if(l=e.substr(n+t.length,1),"english"==(s=translate.language.getCharLanguage(l))||"romance"==s)continue;e=e.replace(new RegExp(r+t+l,"g"),r+a+l)}else e=e.replace(new RegExp(t,"g"),a)}}return e}},office:{export:function(){if(translate.language.getLocal()!=translate.language.getCurrent()){var e="";for(var t in translate.nodeQueue)if(translate.nodeQueue.hasOwnProperty(t)){translate.nodeQueue[t];for(var a in translate.nodeQueue[t].list)if(translate.nodeQueue[t].list.hasOwnProperty(a)&&!("string"!=typeof a||a.length<1))for(var n in translate.nodeQueue[t].list[a])translate.nodeQueue[t].list[a].hasOwnProperty(n)&&(e=e+"\n"+translate.nodeQueue[t].list[a][n].original+"="+translate.storage.get("hash_"+translate.language.getCurrent()+"_"+n))}e.length>0?(e="translate.office.append('"+translate.language.getCurrent()+"',`"+e+"\n`);",translate.util.loadMsgJs(),msg.popups({text:'<textarea id="msgPopupsTextarea" style="width:100%; height:100%; color: black; padding: 8px;">loaing...</textarea>',width:"750px",height:"600px",padding:"1px"}),document.getElementById("msgPopupsTextarea").value=e):msg.alert("无有效内容！")}else alert("本地语种跟要翻译的语种一致，无需导出")},showPanel:function(){let e=document.createElement("div");e.setAttribute("id","translate_export"),e.setAttribute("class","ignore");let t=document.createElement("button");t.onclick=function(){translate.office.export()},t.innerHTML="导出配置信息",t.setAttribute("style","margin-left: 72px; margin-top: 30px; margin-bottom: 20px; font-size: 25px; background-color: blue; padding: 15px; padding-top: 3px; padding-bottom: 3px; border-radius: 3px;"),e.appendChild(t);let a=document.createElement("div");a.innerHTML='1. 首先将当前语种切换为你要翻译的语种<br/>2. 点击导出按钮，将翻译的配置信息导出<br/>3. 将导出的配置信息粘贴到代码中，即可完成<br/><a href="asd" target="_black" style="color: aliceblue;">点此进行查阅详细使用说明</a>',a.setAttribute("style","font-size: 14px; padding: 12px;"),e.appendChild(a),e.setAttribute("style","background-color: black; color: #fff; width: 320px; height: 206px; position: fixed; bottom: 50px; right: 50px;"),document.body.appendChild(e),translate.util.loadMsgJs()},append:function(e,t){for(var a=t.split("\n"),n=0;n<a.length;n++){var r=a[n].trim();if(!(r.length<1)){var s=r.split("=");if(2==s.length){var l=s[0],o=s[1];0!=l.length&&0!=o.length&&translate.storage.set("hash_"+e+"_"+translate.util.hash(l),o)}}}},fullExtract:{set:async function(e,t,a,n){if(void 0!==translate.storage.IndexedDB){var r=await translate.storage.IndexedDB.get("hash_"+e);void 0===r&&null==r&&(r={originalText:t}),r[a]=n,await translate.storage.IndexedDB.set("hash_"+e,r)}else console.log("ERROR: translate.storage.IndexedDB not find")},export:async function(e){if(void 0===translate.storage.IndexedDB)return void console.log("ERROR: translate.storage.IndexedDB not find");if("string"!=typeof e)return void console.log('error : to param not find, example: "english"');var t="translate.office.append('",a=await translate.storage.IndexedDB.list("hash_*");for(var n in a){if(a.hasOwnProperty(n))t=t+"\n"+a[n].value.originalText.replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"="+a[n].value.english.replace(/\n/g,"\\n").replace(/\t/g,"\\t")}t+="\n`);";const r=new Blob([t],{type:"text/plain"}),s=URL.createObjectURL(r),l=document.createElement("a");l.href=s,l.download=e+".txt",l.click(),URL.revokeObjectURL(s)},isUse:!1}},setAutoDiscriminateLocalLanguage:function(){translate.autoDiscriminateLocalLanguage=!0},nodeQueue:{},setDocuments:function(e){null!=e&&void 0!==e&&(void 0===e.length?translate.documents[0]=e:translate.documents=e,translate.nodeQueue={})},getDocuments:function(){if(null!=translate.documents&&void 0!==translate.documents&&translate.documents.length>0)return translate.documents;var e=new Array;return e[0]=document.documentElement,e},listener:{isStart:!1,use:!1,start:function(){void 0===translate.temp_listenerStartInterval&&(translate.listener.use=!0,translate.temp_listenerStartInterval=setInterval(function(){if("complete"==document.readyState){if(!translate.temp_listenerStartInterval)return;if(clearInterval(translate.temp_listenerStartInterval),translate.language.getCurrent()==translate.language.getLocal()&&!translate.language.translateLocal)return;translate.listener.addListener()}},300))},ignoreNode:[],translateExecuteNodeIgnoreExpireTime:1e3,addIgnore:function(e,t,a){let n="";n="string"==typeof e?e:nodeuuid.uuid(e),translate.listener.ignoreNode[n]={addtime:Date.now()+t,text:a}},refreshIgnoreNode:function(){var e=Date.now();for(const t in translate.listener.ignoreNode)translate.listener.ignoreNode[t].addtime<e&&delete translate.listener.ignoreNode[t]},addListener:function(){if(1!=translate.listener.isStart){translate.listener.isStart=!0,translate.listener.config={attributes:!0,childList:!0,subtree:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0},translate.listener.callback=function(e,t){var a=[];for(let t of e){let e=[];"childList"===t.type?t.addedNodes.length>0?e=t.addedNodes:t.removedNodes.length:"attributes"===t.type||"characterData"===t.type&&(e=[t.target]);for(let t of e){for(var n=!1,r=0;r<a.length;r++)if(a[r].isSameNode(t)){n=!0;break}if(n)break;a.push.apply(a,[t])}}if(a.length>0){var s=[];for(let e of a){for(var l=!1,o=0;o<translate.inProgressNodes.length;o++)if(translate.inProgressNodes[o].node.isSameNode(e)){l=!0;break}if(l)continue;let t=nodeuuid.uuid(e);void 0!==translate.listener.ignoreNode[t]&&translate.listener.ignoreNode[t].addtime>Date.now()&&"string"==typeof e.nodeValue&&e.nodeValue==translate.listener.ignoreNode[t].text||s.push(e)}if(s.length<1)return;translate.execute(s)}},translate.listener.observer=new MutationObserver(translate.listener.callback);for(var e=translate.getDocuments(),t=0;t<e.length;t++){var a=e[t];null!=a&&translate.listener.observer.observe(a,translate.listener.config)}}else console.log("translate.listener.start() 已经启动了，无需再重复启动监听，增加浏览器负担")},renderTaskFinish:function(e){},execute:{renderStartByApi:[],renderStartByApiRun:function(e,t,a){for(var n=0;n<translate.listener.execute.renderStartByApi.length;n++)try{translate.listener.execute.renderStartByApi[n](e,t,a)}catch(e){console.log(e)}},renderFinishByApi:[],renderFinishByApiRun:function(e,t,a){for(var n=0;n<translate.listener.execute.renderFinishByApi.length;n++)try{translate.listener.execute.renderFinishByApi[n](e,t,a)}catch(e){console.log(e)}}}},renderTask:class{constructor(){this.taskQueue=[],this.nodes=[]}add(e,t,a,n){var r=translate.element.nodeAnalyse.get(e,n),s=translate.util.hash(r.text);void 0===this.nodes[s]&&(this.nodes[s]=new Array),this.nodes[s].push(e);var l=this.taskQueue[s];null!=l&&void 0!==l||(l=new Array);var o=new Array;" "==t.substr(0,1)&&" "!=a.substr(0,1)&&(a=" "+a)," "===t.substr(t.length-1,1)&&" "!=a.substr(0,1)&&(a+=" "),o.originalText=t,o.resultText=a,o.attribute=n,l.push(o),this.taskQueue[s]=l}execute(){for(var e in this.taskQueue){if(this.taskQueue.hasOwnProperty(e))"function"!=typeof(t=this.taskQueue[e])&&(t.sort((e,t)=>t.originalText.length-e.originalText.length),this.taskQueue[e]=t)}for(var e in translate.listener.refreshIgnoreNode(),this.nodes)if(this.nodes.hasOwnProperty(e))for(var t=this.taskQueue[e],a=0;a<this.nodes[e].length;a++)for(var n=0;n<t.length;n++){var r=t[n];if("function"!=typeof t){var s=this.nodes[e][n];setTimeout(function(e){for(var t=0;t<translate.inProgressNodes.length;t++)if(translate.inProgressNodes[t].node.isSameNode(e)){translate.inProgressNodes[t].number=translate.inProgressNodes[t].number-1,translate.inProgressNodes[t].number<1&&translate.inProgressNodes.splice(t,1);break}},50,s);var l=translate.element.nodeAnalyse.set(this.nodes[e][n],r.originalText,r.resultText,r.attribute);translate.listener.addIgnore(this.nodes[e][n],translate.listener.translateExecuteNodeIgnoreExpireTime,l.resultText)}}if(void 0!==this.taskQueue&&Object.keys(this.taskQueue).length>0){var o=this;setTimeout(function(){for(var e in o.nodes)if(o.nodes.hasOwnProperty(e))for(var t in o.nodes[e])if(o.nodes[e].hasOwnProperty(t)){var a=translate.element.nodeAnalyse.get(o.nodes[e][t]),n=nodeuuid.uuid(a.node);0!=n.length&&(translate.nodeHistory[n]={},translate.nodeHistory[n].node=a.node,translate.whole.isWhole(a.node)?translate.nodeHistory[n].translateText=o.taskQueue[e][t].resultText:translate.nodeHistory[n].translateText=a.text)}translate.listener.renderTaskFinish(o)},50)}}},state:0,waitingExecute:{use:!0,queue:[],add:function(e){translate.waitingExecute.queue.push(e);let t=setInterval(function(){if(0==translate.state){clearInterval(t);var e=translate.waitingExecute.get();translate.execute(e)}},500)},get:function(){return translate.waitingExecute.queue.length>0?translate.waitingExecute.queue.shift():(console.log("警告， translate.waitingExecute.get 出现异常，quque已空，但还往外取。"),null)},isAllExecuteFinish:function(e,t,a){for(var n in translate.listener.execute.renderFinishByApiRun(e,t,a),translate.translateRequest[e])if(translate.translateRequest[e].hasOwnProperty(n)&&0==translate.translateRequest[e][n].executeFinish)return;translate.lifecycle.execute.renderFinish_Trigger(e,a),translate.state=0,translate.executeNumber++}},executeNumber:0,lifecycle:{execute:{start:[],start_Trigger:function(e,t){for(var a=0;a<translate.lifecycle.execute.start.length;a++)try{translate.lifecycle.execute.start[a](e,t)}catch(e){console.log(e)}},start_old:[],startRun:function(e,t,a){for(var n=0;n<translate.listener.execute.renderStartByApi.length;n++)try{translate.listener.execute.renderStartByApi[n](e,t,a)}catch(e){console.log(e)}},scanNodesFinsh:[],translateNetworkBefore:[],translateNetworkBefore_Trigger:function(e,t,a,n){for(var r=0;r<translate.lifecycle.execute.translateNetworkBefore.length;r++)try{translate.lifecycle.execute.translateNetworkBefore[r](e,t,a,n)}catch(e){console.log(e)}},translateNetworkAfter:[],renderFinish:[function(e,t){void 0!==translate.visual&&translate.visual.adjustTranslationSpacesByNodequeueUuid(e)}],renderFinish_Trigger:function(e,t){for(var a=0;a<translate.lifecycle.execute.renderFinish.length;a++)try{translate.lifecycle.execute.renderFinish[a](e,t)}catch(e){console.log(e)}}}},execute:function(e){if(translate.waitingExecute.use&&0!=translate.state)return console.log("当前翻译还未完结，新的翻译任务已加入等待翻译队列中，待翻译结束后便会执行当前翻译任务。"),void translate.waitingExecute.add(e);translate.state=1,void 0!==e&&(translate.useVersion="v2"),"v1"==translate.useVersion&&(console.log("提示：https://github.com/xnx3/translate 在 v2.5 版本之后，由于谷歌翻译调整，免费翻译通道不再支持，所以v1版本的翻译接口不再被支持，v1全线下架。考虑到v1已不能使用，当前已自动切换到v2版本。如果您使用中发现什么异常，请针对v2版本进行适配。"),translate.useVersion="v2");try{translate.init()}catch(e){}var t=translate.util.uuid();if(null==translate.to||""==translate.to){var a=translate.storage.get("to");null!=a&&void 0!==a&&a.length>0&&(translate.to=a)}try{translate.selectLanguageTag.render()}catch(e){console.log(e)}if(null==translate.to||void 0===translate.to||0==translate.to.length){if(!translate.autoDiscriminateLocalLanguage)return void(translate.state=0);translate.executeByLocalLanguage()}if(translate.to!=translate.language.getLocal()||translate.language.translateLocal){var n;translate.lifecycle.execute.start_Trigger(t,translate.to),translate.images.execute(),void 0!==e&&null!=e?void 0===e.length?(n=new Array)[0]=e:n=e:n=translate.getDocuments(),n.length>500&&(console.log("------tip------"),console.log("translate.execute( docs ) 传入的docs.length 过大，超过500，这很不正常，当前 docs.length : "+n.length+" ,如果你感觉真的没问题，请联系作者 http://translate.zvo.cn/43006.html 说明情况，根据你的情况进行分析。 当前只取前500个元素进行翻译"));try{for(var r in translate.element.tagAttribute)if(translate.element.tagAttribute.hasOwnProperty(r)&&translate.element.tagAttribute[r]instanceof Array){var s=translate.element.tagAttribute[r];translate.element.tagAttribute[r]={attribute:s,condition:function(e){return!0}}}}catch(e){console.log(e)}for(var l=0;l<n.length&l<500;l++){var o=n[l];translate.element.whileNodes(t,o)}if(translate.language.translateLanguagesRange.length>0)for(var i in translate.nodeQueue[t].list)translate.nodeQueue[t].list.hasOwnProperty(i)&&translate.language.translateLanguagesRange.indexOf(i)<0&&delete translate.nodeQueue[t].list[i];for(var i in void 0===translate.nodeQueue[t]&&(translate.nodeQueue[t]=new Array,translate.nodeQueue[t].list=[],console.log("--- translate.js warn tip 警告！！ ---"),console.log("您使用translate.js时可能放的位置不对，不要吧 translate.js 放在网页最顶部，这样当 translate.js 进行执行，也就是 translate.execute() 执行时，因为网页是从上往下加载，它放在网页最顶部，那么它执行时网页后面的内容都还没加载出来，这个是不会获取到网页任何内容的，也就是它是不起任何作用的")),translate.nodeQueue[t].list)if(translate.nodeQueue[t].list.hasOwnProperty(i)){for(var u in translate.nodeQueue[t].list[i])if(translate.nodeQueue[t].list[i].hasOwnProperty(u)&&"function"!=typeof translate.nodeQueue[t].list[i][u]&&void 0!==translate.nodeQueue[t].list[i][u].nodes&&void 0!==translate.nodeQueue[t].list[i][u].nodes.length){for(var d=translate.nodeQueue[t].list[i][u].nodes.length-1;d>-1;d--){var c=translate.element.nodeAnalyse.get(translate.nodeQueue[t].list[i][u].nodes[d].node),g=nodeuuid.uuid(c.node);void 0!==translate.nodeHistory[g]&&translate.nodeHistory[g].translateText==c.text&&translate.nodeQueue[t].list[i][u].nodes.splice(d,1)}0==translate.nodeQueue[t].list[i][u].nodes.length&&delete translate.nodeQueue[t].list[i][u]}0==Object.keys(translate.nodeQueue[t].list[i]).length&&delete translate.nodeQueue[t].list[i]}var h={},f={},p={},m=[];for(var i in translate.nodeQueue[t].list){if(!translate.nodeQueue[t].list.hasOwnProperty(i))continue;if(null==i||void 0===i||0==i.length||"undefined"==i)continue;h[i]=[],f[i]=[];let e=new translate.renderTask;for(var u in p[i]=[],translate.nodeQueue[t].list[i])if(translate.nodeQueue[t].list[i].hasOwnProperty(u)&&"function"!=typeof translate.nodeQueue[t].list[i][u]){var v=translate.nodeQueue[t].list[i][u].original,x=translate.nodeQueue[t].list[i][u].translateText,y=v==x?u:translate.util.hash(x);translate.nodeQueue[t].list[i][u].cacheHash=y;var w=translate.storage.get("hash_"+translate.to+"_"+y);if(null!=w&&w.length>0)for(var b=0;b<translate.nodeQueue[t].list[i][u].nodes.length;b++){for(var T=translate.nodeQueue[t].list[i][u].nodes[b].node,N=!1,q=0;q<translate.inProgressNodes.length;q++)translate.inProgressNodes[q].node.isSameNode(T)&&(translate.inProgressNodes[q].number++,N=!0);N||translate.inProgressNodes.push({node:T,number:1});var k=translate.nodeQueue[t].list[i][u].nodes[b].beforeText+w+translate.nodeQueue[t].list[i][u].nodes[b].afterText;e.add(translate.nodeQueue[t].list[i][u].nodes[b].node,v,k,translate.nodeQueue[t].list[i][u].nodes[b].attribute);var O=-1;for(l=0;l<p[i].length;l++)if(translate.nodeQueue[t].list[i][u].nodes[b].node.isSameNode(p[i][l].node)){O=l;break}var _=-1;for(l=0;l<m.length;l++)if(translate.nodeQueue[t].list[i][u].nodes[b].node.isSameNode(m[l].node)){_=l;break}-1==O&&(O=p[i].length,p[i][O]={},p[i][O].node=translate.nodeQueue[t].list[i][u].nodes[b].node,p[i][O].array=[]),-1==_&&(m[_=m.length]={},m[_].node=translate.nodeQueue[t].list[i][u].nodes[b].node,m[_].array=[]);var C=p[i][O].array.length;p[i][O].array[C]=k;var R=m[_].array.length;m[_].array[R]=k}else h[i].push(x),f[i].push(u)}e.execute()}if("string"!=typeof translate.request.api.translate||null==translate.request.api.translate||translate.request.api.translate.length<1)return translate.state=0,translate.lifecycle.execute.renderFinish_Trigger(t,translate.to),void translate.executeNumber++;for(var i in p)if(p.hasOwnProperty(i)){var I=Object.keys(translate.nodeQueue[t].list[i]),L=I.length;for(l=0;l<p[i].length;l++){for(var A=0;A<m.length;A++)if(p[i][l].node.isSameNode(m[A].node)){p[i][l].array=m[A].array;break}p[i][l].array.sort(function(e,t){return t.length-e.length});for(var j=translate.element.nodeAnalyse.get(p[i][l].node),E=j.text,Q=0;Q<p[i][l].array.length;Q++)p[i][l].array[Q]<1||(E=E.replace(new RegExp(translate.util.regExp.pattern(p[i][l].array[Q]),"g"),translate.util.regExp.resultText("\n")));for(var S=E.split("\n"),P=0;P<S.length;P++)S[P]<1||translate.addNodeToQueue(t,j.node,S[P])}var D=Object.keys(translate.nodeQueue[t].list[i]);if(L-D.length!=0)for(var F=0;F<D.length;F++){var B=D[F];if(-1==I.indexOf(B)){var H=translate.nodeQueue[t].list[i][B];y=H.original==H.translateText?B:translate.util.hash(H.translateText);translate.nodeQueue[t].list[i][B].cacheHash=y,h[i].push(H.translateText),f[i].push(B)}}}var z=[];for(var i in translate.nodeQueue[t].list)translate.nodeQueue[t].list.hasOwnProperty(i)&&void 0!==h[i]&&(h[i].length<1||i!=translate.to&&z.push(i));if(0==z.length)return translate.lifecycle.execute.renderFinish_Trigger(t,translate.to),translate.state=0,void translate.executeNumber++;for(var i in f)if(f.hasOwnProperty(i)&&void 0!==f[i]&&!(f[i].length<1))for(var M=0;M<f[i].length;M++){var U=f[i][M];if(void 0!==translate.nodeQueue[t].list[i][U].nodes&&void 0!==translate.nodeQueue[t].list[i][U].nodes.length)for(var $=0;$<translate.nodeQueue[t].list[i][U].nodes.length;$++){for(T=translate.nodeQueue[t].list[i][U].nodes[$].node,N=!1,q=0;q<translate.inProgressNodes.length;q++)translate.inProgressNodes[q].node.isSameNode(T)&&(translate.inProgressNodes[q].number++,N=!0);N||translate.inProgressNodes.push({node:T,number:1})}else console.log("translate.nodeQueue['"+t+"']['list']['"+i+"']['"+U+"'].nodes.length is null ，理论上不应该存在，进行异常报出，但不影响使用，已容错。")}for(var V in translate.state=20,z){if(z.hasOwnProperty(V))if("string"==typeof(i=z[V])){if(void 0===h[i]||h[i].length<1)return console.log("异常,理论上不应该存在, lang:"+i+", translateTextArray:"),console.log(h),console.log("你无需担心，这个只是个提示，它并不影响你翻译的正常进行，只是个异常提示而已，它会自动容错处理的，不会影响翻译的使用。"),translate.state=0,void translate.executeNumber++;void 0!==translate.translateRequest[t]&&null!=translate.translateRequest[t]||(translate.translateRequest[t]={}),translate.translateRequest[t][i]={},translate.translateRequest[t][i].executeFinish=0,translate.translateRequest[t][i].addtime=Math.floor(Date.now()/1e3),translate.listener.execute.renderStartByApiRun(t,i,translate.to),translate.lifecycle.execute.translateNetworkBefore_Trigger(t,i,translate.to,h[i]);var J=translate.request.api.translate,X={from:i,to:translate.to,text:encodeURIComponent(JSON.stringify(h[i]))};translate.request.post(J,X,function(e){if(1!=e.result){"object"==typeof translate.translateRequest[t]&&"object"==typeof translate.translateRequest[t][e.from]?(translate.translateRequest[t][e.from].result=2,translate.translateRequest[t][e.from].executeFinish=1,translate.translateRequest[t][e.from].stoptime=Math.floor(Date.now()/1e3)):console.log("WARINNG!!! translate.translateRequest[uuid][data.from] is not object");var a="";void 0!==e.from&&null!=e.from&&(a=e.from);var n="";return n=void 0!==e.to&&null!=e.to?e.to:translate.to,translate.waitingExecute.isAllExecuteFinish(t,a,n),console.log("=======ERROR START======="),console.log(h[e.from]),console.log("response : "+e.info),void console.log("=======ERROR END  =======")}if(void 0===translate.nodeQueue[t])return void console.log("提示：你很可能多次引入了 translate.js 所以造成了翻译本身的数据错乱，这只是个提示，它还是会给你正常翻译的，但是你最好不要重复引入太多次 translate.js ，正常情况下只需要引入一次 translate.js 就可以了。太多的话很可能会导致你页面卡顿");let r=new translate.renderTask;for(var s=0;s<f[e.from].length;s++){var l=e.from,o=e.text[s];if(null!=o){o.toLowerCase().indexOf(h[e.from][s].toLowerCase())>-1&&(o=h[e.from][s]);var i=f[e.from][s],u=translate.nodeQueue[t].list[l][i].cacheHash,d="";try{d=translate.nodeQueue[t].list[l][i].original}catch(e){console.log("uuid:"+t+", originalWord:"+d+", lang:"+l+", hash:"+i+", text:"+o+", queue:"+translate.nodeQueue[t]),console.log(e);continue}for(var c=0;c<translate.nodeQueue[t].list[l][i].nodes.length;c++)r.add(translate.nodeQueue[t].list[l][i].nodes[c].node,d,translate.nodeQueue[t].list[l][i].nodes[c].beforeText+o+translate.nodeQueue[t].list[l][i].nodes[c].afterText,translate.nodeQueue[t].list[l][i].nodes[c].attribute);translate.storage.set("hash_"+e.to+"_"+u,o),translate.office.fullExtract.isUse&&translate.office.fullExtract.set(i,d,e.to,o)}}r.execute(),translate.translateRequest[t][l].result=1,translate.translateRequest[t][l].executeFinish=1,translate.translateRequest[t][l].stoptime=Math.floor(Date.now()/1e3),setTimeout(function(){translate.waitingExecute.isAllExecuteFinish(t,e.from,e.to)},10)},function(e){translate.translateRequest[t][e.data.from].executeFinish=1,translate.translateRequest[t][e.data.from].stoptime=Math.floor(Date.now()/1e3),translate.translateRequest[t][e.data.from].result=3,translate.waitingExecute.isAllExecuteFinish(t,e.data.from,translate.to)})}}}else translate.state=0},translateRequest:{},nodeHistory:{},element:{tagAttribute:{},nodeAnalyse:{get:function(e,t){return translate.element.nodeAnalyse.analyse(e,"","",t)},set:function(e,t,a,n){return translate.element.nodeAnalyse.analyse(e,t,a,n)},analyse:function(e,t,a,n){var r=new Array;r.node=e,r.text="";var s=translate.element.getNodeName(e);if(null!=n&&"string"==typeof n&&n.length>0){var l;if(l="INPUT"==s&&"value"==n.toLowerCase()?e.value:e[n],r.text=l,void 0!==t&&t.length>0){if(void 0!==l){var o=translate.util.textReplace(l,t,a,translate.to);"INPUT"==s&&"value"==n.toLowerCase()?e.value=o:e[n]=o,o.indexOf(a)>-1?r.resultText=o:r.resultText=""}var i=e.getAttribute(n);if(null!=i&&void 0!==i){o=translate.util.textReplace(i,t,a,translate.to);e.setAttribute(n,o),o.indexOf(a)>-1?r.resultText=o:r.resultText=""}}return r}"#text"==s&&(void 0!==e.parentNode&&"TEXTAREA"==translate.element.getNodeName(e.parentNode)&&(s="TEXTAREA",e=e.parentNode));if("INPUT"==s||"TEXTAREA"==s){if(null==e.attributes||void 0===e.attributes)return r.text="",r;if("INPUT"==s&&void 0!==e.attributes.type&&null!=typeof e.attributes.type.nodeValue&&("button"==e.attributes.type.nodeValue.toLowerCase()||"submit"==e.attributes.type.nodeValue.toLowerCase())){var u=e.attributes.value;if(null!=u&&void 0!==u&&void 0!==u.nodeValue&&u.nodeValue.length>0){if(void 0!==t&&t.length>0){o=translate.util.textReplace(u.nodeValue,t,a,translate.to);u.nodeValue=o,o.indexOf(a)>-1?r.resultText=o:r.resultText=""}return r.text=u.nodeValue,r.node=u,r}}if(void 0!==e.attributes.placeholder){if(void 0!==t&&t.length>0){o=translate.util.textReplace(e.attributes.placeholder.nodeValue,t,a,translate.to);e.attributes.placeholder.nodeValue=o,o.indexOf(a)>-1?r.resultText=o:r.resultText=""}return r.text=e.attributes.placeholder.nodeValue,r.node=e.attributes.placeholder,r}return r.text="",r}if("META"==s){if(void 0!==e.name&&null!=e.name){var d=e.name.toLowerCase(),c=e.getAttribute("property"),g="";if(void 0!==c&&null!=c&&c.length>0&&(g=c.toLowerCase()),"keywords"==d||"description"==d||"sharetitle"==d||"og:title"==g||"og:description"==g||"og:site_name"==g||"og:novel:latest_chapter_name"==g){if(void 0!==t&&null!=t&&t.length>0){o=translate.util.textReplace(e.content,t,a,translate.to);e.content=o,o.indexOf(a)>-1?r.resultText=o:r.resultText=""}return r.text=e.content,r}}return r.text="",r}if("IMG"==s){if(void 0===e.alt||null==e.alt)return r.text="",r;if(void 0!==t&&t.length>0){o=translate.util.textReplace(e.alt,t,a,translate.to);e.alt=o,o.indexOf(a)>-1?r.resultText=o:r.resultText=""}return r.text=e.alt,r}if(null==e.nodeValue||void 0===e.nodeValue)r.text="";else if(0==e.nodeValue.trim().length)r.text="";else{if(void 0!==t&&null!=t&&t.length>0){o=translate.util.textReplace(e.nodeValue,t,a,translate.to);e.nodeValue=o,o.indexOf(a)>-1?r.resultText=o:r.resultText=""}r.text=e.nodeValue}return r}},getNodeName:function(e){if(null==e||void 0===e)return"";if(null==e.nodeName||void 0===e.nodeName)return"";e.nodeName;return"string"==typeof e.nodeName?e.nodeName:"string"==typeof e.tagName&&e.tagName.length>0?e.tagName:(console.log("warn : get nodeName is null, this node ignore translate. node : "),console.log(e),"")},whileNodes:function(e,t){if(null!=t&&void 0!==t){void 0!==translate.nodeQueue[e]&&null!=translate.nodeQueue[e]||(translate.nodeQueue[e]=new Array,translate.nodeQueue[e].expireTime=Date.now()+12e4,translate.nodeQueue[e].list=new Array),"object"==typeof t&&"string"==typeof t.title&&t.title.length>0&&(translate.ignore.isIgnore(t)||translate.addNodeToQueue(e,t,t.title,"title"));var a=translate.element.getNodeName(t).toLowerCase();if(void 0!==translate.element.tagAttribute[a])for(var n in translate.element.tagAttribute[a].attribute)if(translate.element.tagAttribute[a].attribute.hasOwnProperty(n)&&(void 0===translate.element.tagAttribute[a].condition||translate.element.tagAttribute[a].condition(t))){var r=translate.element.tagAttribute[a].attribute[n];if("input"==a&&"value"==r.toLowerCase())s=t.value,"DOMProperty";else{var s=t.getAttribute(r);if(void 0!==s&&null!=s||(s=t[r],"DOMProperty"),void 0===s||null==s)continue}translate.ignore.isIgnore(t)||translate.addNodeToQueue(e,t,s,r)}var l=t.childNodes;if(null!=l&&void 0!==l)if(l.length>0)for(var o=0;o<l.length;o++)translate.element.whileNodes(e,l[o]);else translate.element.findNode(e,t)}},findNode:function(e,t){if(null!=t&&void 0!==t&&null!=t.parentNode){var a=translate.element.getNodeName(t.parentNode);if(""!=a&&!(translate.ignore.tag.indexOf(a.toLowerCase())>-1||translate.ignore.isIgnore(t))){var n=translate.element.nodeAnalyse.get(t);n.text.length>0&&translate.addNodeToQueue(e,n.node,n.text)}}}},addNodeToQueue:function(e,t,a,n){if(null!=t&&null!=a&&0!=a.length&&"#comment"!=translate.element.getNodeName(t).toLowerCase()){translate.util.hash(a);if(translate.util.findTag(a)){if(null==t.parentNode)return;var r=translate.element.getNodeName(t.parentNode);if("SCRIPT"==r||"STYLE"==r)return}var s=new Array;s.push(a);for(var l=0;l<translate.ignore.textRegex.length;l++)for(var o=translate.ignore.textRegex[l],i=0;i<s.length;i++){var u=(a=s[i]).match(o)||[];translate.ignore.text=translate.ignore.text.concat(u)}for(var d=0;d<translate.ignore.text.length;d++)0!=translate.ignore.text[d].trim().length&&(s=translate.addNodeToQueueTextAnalysis(e,t,s,n,translate.ignore.text[d],translate.ignore.text[d]));if(void 0===translate.temp_nomenclature&&(translate.temp_nomenclature=new Array),void 0===translate.temp_nomenclature[translate.language.getLocal()]&&(c=new Array),void 0!==translate.nomenclature.data[translate.language.getLocal()]&&void 0!==translate.nomenclature.data[translate.language.getLocal()][translate.to]){var c;for(var g in translate.nomenclature.data[translate.language.getLocal()][translate.to])if(translate.nomenclature.data[translate.language.getLocal()][translate.to].hasOwnProperty(g)){var h=translate.nomenclature.data[translate.language.getLocal()][translate.to][g];s=translate.addNodeToQueueTextAnalysis(e,t,s,n,g,h),void 0!==c&&c.push(g)}void 0===translate.temp_nomenclature[translate.language.getLocal()]&&(translate.temp_nomenclature[translate.language.getLocal()]=c)}for(i=0;i<s.length;i++)0!=s[i].trim().length&&(translate.ignore.text.indexOf(s[i].trim())>-1||void 0!==translate.temp_nomenclature[translate.language.getLocal()]&&translate.temp_nomenclature[translate.language.getLocal()].indexOf(s[i].trim())>-1||translate.addNodeToQueueAnalysis(e,t,s[i],n))}},addNodeToQueueTextAnalysis:function(e,t,a,n,r,s){for(var l=new Array,o=0;o<a.length;o++){var i=a[o];if(i.trim()!=s.trim())if(i.indexOf(r)>-1){if(r!=s)if(r.length>=s.length&&r.indexOf(s)>-1);else if(s.length>=r.length&&s.indexOf(r)>-1){for(var u=[],d=i.indexOf(r);-1!==d;)u.push(d),d=i.indexOf(r,d+1);for(var c=0,g=0;g<u.length;g++){d=u[g];i.substring(d,d+s.length)===s&&(c+=1)}if(c-u.length==0)continue}r!=s&&translate.element.nodeAnalyse.set(t,r,s,n);for(var h=i.split(r),f=0;f<h.length;f++){var p=h[f];0!=p.trim().length&&(a.push(p),l.push(i))}}}if(l.length>0)for(var m=0;m<l.length;m++){let e=a.indexOf(l[m]);e>-1&&a.splice(e,1)}return a},addNodeToQueueAnalysis:function(e,t,a,n){var r=translate.language.recognition(a),s=r.languageArray;if(void 0!==s[translate.to]&&delete s[translate.to],translate.whole.isWhole(t)){l=r.languageName;translate.addNodeQueueItem(e,t,a,n,l,"","")}else for(var l in s)if(s.hasOwnProperty(l))for(var o=0;o<s[l].list.length;o++)if(void 0!==s[l].list[o]&&void 0!==s[l].list[o].text){var i=s[l].list[o].text,u=s[l].list[o].beforeText,d=s[l].list[o].afterText;translate.addNodeQueueItem(e,t,i,n,l,u,d)}},addNodeQueueItem:function(e,t,a,n,r,s,l){null!=translate.nodeQueue[e].list[r]&&void 0!==translate.nodeQueue[e].list[r]||(translate.nodeQueue[e].list[r]=new Array);var o=translate.util.hash(a);null!=translate.nodeQueue[e].list[r][o]&&void 0!==translate.nodeQueue[e].list[r][o]||(translate.nodeQueue[e].list[r][o]=new Array,translate.nodeQueue[e].list[r][o].nodes=new Array,translate.nodeQueue[e].list[r][o].original=a,translate.nodeQueue[e].list[r][o].translateText=a);var i=!1;if(void 0!==t.isSameNode)for(var u=0;u<translate.nodeQueue[e].list[r][o].nodes.length;u++)t.isSameNode(translate.nodeQueue[e].list[r][o].nodes[u].node)&&n===translate.nodeQueue[e].list[r][o].nodes[u].attribute&&(i=!0);if(!i){var d=translate.nodeQueue[e].list[r][o].nodes.length;translate.nodeQueue[e].list[r][o].nodes[d]=new Array,translate.nodeQueue[e].list[r][o].nodes[d].node=t,translate.nodeQueue[e].list[r][o].nodes[d].attribute=n,translate.nodeQueue[e].list[r][o].nodes[d].beforeText=s,translate.nodeQueue[e].list[r][o].nodes[d].afterText=l}},whole:{isEnableAll:!1,enableAll:function(){translate.whole.isEnableAll=!0},class:[],tag:[],id:[],executeTip:function(){0==translate.whole.class.length&&0==translate.whole.tag.length&&0==translate.whole.id.length||console.log("您开启了 translate.whole 此次行为避开了浏览器端的文本语种自动识别，而是暴力的直接对某个元素的整个文本进行翻译，很可能会产生非常大的翻译量，请谨慎！有关每日翻译字符的说明，可参考： http://translate.zvo.cn/42557.html "),translate.whole.tag.indexOf("html")>-1&&console.log("自检发现您设置了 translate.whole.tag 其中有 html ，这个是不生效的，最大只允许设置到 body ")},isWhole:function(e){if(translate.whole.isEnableAll)return!0;if(0==translate.whole.class.length&&0==translate.whole.tag.length&&0==translate.whole.id.length&&0==translate.whole.isEnableAll)return!1;if(null==e||void 0===e)return!1;for(var t=e,a=100;a-- >0;){if(null==t||void 0===t)return!1;var n=translate.element.getNodeName(t).toLowerCase();if(n.length>0){if("html"==n||"#document"==n)return!1;if(translate.whole.tag.indexOf(n)>-1)return!0}if(null!=t.className){var r=t.className;if(null==r||"string"!=typeof r)continue;r=r.trim().split(" ");for(var s=0;s<r.length;s++)if(null!=r[s]&&r[s].trim().length>0&&translate.whole.class.indexOf(r[s])>-1)return!0}if(null!=t.id&&void 0!==t.id&&translate.whole.id.indexOf(t.id)>-1)return!0;t=t.parentElement}return!1}},language:{englishVarietys:["french","italian","deutsch","portuguese"],local:"",translateLocal:!1,translateLanguagesRange:[],setLocal:function(e){translate.useVersion="v2",translate.language.local=e},getLocal:function(){return(null==translate.language.local||translate.language.local.length<1)&&translate.language.autoRecognitionLocalLanguage(),translate.language.local},getCurrent:function(){var e=translate.storage.get("to");return null!=e&&void 0!==e&&e.length>0?e:translate.language.getLocal()},setDefaultTo:function(e){var t=translate.storage.get("to");null!=t&&void 0!==t&&t.length>0||(translate.storage.set("to",e),translate.to=e)},clearCacheLanguage:function(){void 0!==translate.language.setUrlParamControl_use&&translate.language.setUrlParamControl_use&&(console.log("使用提示："),console.log("translate.language.setUrlParamControl(...) 的作用是 可以通过URL传一个语种，来指定当前页面以什么语种显示。 参考文档： http://translate.zvo.cn/4075.html"),console.log("translate.language.clearCacheLanguage() 是清除历史翻译语种缓存，也就是清除之前指定翻译为什么语种。 参考文档：http://translate.zvo.cn/4080.html"),console.log("如果你执行了 translate.language.setUrlParamControl(...) 那么是要根据url传参来切换语种的，但是后面又出现了 translate.language.clearCacheLanguage() 它会阻止 translate.language.setUrlParamControl(...) 它的设置，即使有url传递翻译为什么语言，也会因为 translate.language.clearCacheLanguage() 给清除掉，使URL传参的语种不起任何作用。")),translate.to="",translate.storage.set("to","")},setUrlParamControl:function(e){translate.language.setUrlParamControl_use=!0,(void 0===e||e.length<1)&&(e="language");var t=translate.util.getUrlParam(e);void 0!==t&&""!=t&&"null"!=t&&"undefined"!=t&&(translate.storage.set("to",t),translate.to=t)},getTranslateAreaText:function(){var e="",t=document.createElement("div");if(null!=translate.documents&&void 0!==translate.documents&&translate.documents.length>0)for(var a=0;a<translate.documents.length;a++){var n=translate.documents[a];void 0!==n&&null!=n&&void 0!==n.innerText&&null!=n.innerText&&n.innerText.length>0&&t.appendChild(n.cloneNode(!0))}else void 0!==document.head&&t.appendChild(document.head.cloneNode(!0)),void 0!==document.body&&t.appendChild(document.body.cloneNode(!0));for(var r=0;r<translate.ignore.tag.length;r++)for(var s=translate.ignore.tag[r],l=t.querySelectorAll(s),o=Array.prototype.slice.call(l),i=0;i<o.length;i++){var u=o[i];u.parentNode&&u.parentNode.removeChild(u)}if(!(null==(e=t.innerText)||void 0===e||e.length<1))return e=e.replace(/\s/g,"");translate.language.local="chinese_simplified"},autoRecognitionLocalLanguage:function(){if(null!=translate.language.local&&translate.language.local.length>2)return translate.language.local;var e=translate.language.getTranslateAreaText();translate.language.local="chinese_simplified";var t=translate.language.recognition(e);return translate.language.local=t.languageName,translate.language.local},get:function(e){for(var t=new Array,a=new Array,n=[],r=[],s=0;s<e.length;s++){var l=e.charAt(s),o=translate.language.getCharLanguage(l);""==o&&(o="unidentification");var i=translate.language.analyse(o,a,n,r,l);a=i.langStrs,void 0!==n.language&&(r.language=n.language,r.charstr=n.charstr,r.storage_language=n.storage_language),n.language=i.storage_language,n.charstr=l,n.storage_language=i.storage_language,t.push(o)}return void 0!==a.unidentification&&delete a.unidentification,void 0!==a.specialCharacter&&delete a.specialCharacter,void 0!==a.number&&delete a.number,a},recognitionAlgorithm:function(e,t,a,n){if(void 0!==a.english&&void 0!==a.romance&&"english"==t.languageName&&a.romance/a.english>.008&&(void 0!==translate.language.local&&translate.language.local.length>1&&translate.language.englishVarietys.indexOf(translate.language.local)>-1&&(t.languageName=translate.language.local),"english"==t.languageName)){var r=translate.language.romanceSentenceAnaly(e);0==r.length?console.log("语种识别异常，应该是 法语、西班牙语、葡萄牙语、意大利语 中的一种才是，除非是除了这四种语种之外的别的 罗曼语族 中的语种，当前已将 "+e+"识别为英语。 你可以联系我们求助 https://translate.zvo.cn/4030.html"):t.languageName=r}if(void 0!==a.japanese&&"japanese"!=t.languageName&&a.japanese/n>.08&&(t.languageName="japanese"),(void 0!==a.chinese_simplified||void 0!==a.chinese_traditional)&&void 0!==a.english&&"english"==t.languageName){var s=0;void 0!==a.chinese_simplified&&(s+=a.chinese_simplified),void 0!==a.chinese_traditional&&(s+=a.chinese_traditional),s/a.english>.05&&(t.languageName="chinese_simplified")}return void 0!==a.chinese_simplified&&void 0!==a.chinese_traditional&&"chinese_simplified"==t.languageName&&a.chinese_traditional/a.chinese_simplified>.03&&(t.languageName="chinese_traditional"),t},recognition:function(e){var t=translate.language.get(e),a=[],n=[],r=0;for(var s in t)if(t.hasOwnProperty(s)&&"object"==typeof t[s]){for(var l=0,o=0;o<t[s].length;o++)l+=t[s][o].text.length;r+=l,a[s]=l,n[s]=l}var i="",u=0;for(var d in a)a.hasOwnProperty(d)&&a[d]>u&&(i=d,u=a[d]);var c={};for(var d in t)t.hasOwnProperty(d)&&(c[d]={},c[d].number=n[d],c[d].list=t[d]);var g={languageName:i,languageArray:c};return translate.language.recognitionAlgorithm(e,g,a,r)},getCharLanguage:function(e){if(null==e||void 0===e)return"";if(this.russian(e))return"russian";if(this.english(e))return"english";if(this.romance(e))return"romance";if(this.specialCharacter(e))return"specialCharacter";if(this.number(e))return"number";var t=this.chinese(e);return"simplified"==t?"chinese_simplified":"traditional"==t?"chinese_traditional":this.japanese(e)?"japanese":this.korean(e)?"korean":this.greek(e)?"greek":this.thai(e)?"thai":this.arabic(e)?"arabic":this.romanian(e)?"romanian":this.hebrew(e)?"hebrew":""},analyse:function(e,t,a,n,r){void 0===t[e]&&(t[e]=new Array);var s=0;void 0===a.storage_language||(translate.language.connector(r)&&(e=a.storage_language),s=a.storage_language==e?t[e].length-1:t[e].length),void 0===t[e][s]&&(t[e][s]=new Array,t[e][s].beforeText="",t[e][s].afterText="",t[e][s].text=""),t[e][s].text=t[e][s].text+r,0==translate.language.wordBlankConnector(translate.language.getLocal())&&translate.language.wordBlankConnector(translate.to)&&null!=a.storage_language&&void 0!==a.storage_language&&a.storage_language.length>0&&"specialCharacter"!=a.storage_language&&(0==translate.language.wordBlankConnector(a.storage_language)&&translate.language.wordBlankConnector(e)?t[a.storage_language][t[a.storage_language].length-1].afterText=" ":"english"==a.storage_language&&"english"!=e&&(t[e][s].beforeText=" "));var l=new Array;return l.langStrs=t,l.storage_language=e,l},connector:function(e){return!!/.*[\u0020\u00A0\u202F\u205F\u3000]+.*$/.test(e)||(!!/.*[\u0030-\u0039]+.*$/.test(e)||(!!/.*[\u0021\u0022\u0023\u0024\u0025\u0026\u0027\u002C\u002D\u002E\u003A\u003B\u003F\u0040]+.*$/.test(e)||!!/.*[\u3002\uFF1F\uFF01\uFF0C\u3001\uFF1B\uFF1A\u300C\u300D\u300E\u300F\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\u3010\u3011\u2014\u2026\u2013\uFF0E\u300A\u300B\u3008\u3009\u00b7]+.*$/.test(e)))},wordBlankConnector:function(e){if(null==e||void 0===e)return!0;switch(e.trim().toLowerCase()){case"chinese_simplified":case"chinese_traditional":case"korean":case"japanese":return!1}return!0},chinese_traditional_dict:"皚藹礙愛翺襖奧壩罷擺敗頒辦絆幫綁鎊謗剝飽寶報鮑輩貝鋇狽備憊繃筆畢斃閉邊編貶變辯辮鼈癟瀕濱賓擯餅撥缽鉑駁蔔補參蠶殘慚慘燦蒼艙倉滄廁側冊測層詫攙摻蟬饞讒纏鏟産闡顫場嘗長償腸廠暢鈔車徹塵陳襯撐稱懲誠騁癡遲馳恥齒熾沖蟲寵疇躊籌綢醜櫥廚鋤雛礎儲觸處傳瘡闖創錘純綽辭詞賜聰蔥囪從叢湊竄錯達帶貸擔單鄲撣膽憚誕彈當擋黨蕩檔搗島禱導盜燈鄧敵滌遞締點墊電澱釣調諜疊釘頂錠訂東動棟凍鬥犢獨讀賭鍍鍛斷緞兌隊對噸頓鈍奪鵝額訛惡餓兒爾餌貳發罰閥琺礬釩煩範販飯訪紡飛廢費紛墳奮憤糞豐楓鋒風瘋馮縫諷鳳膚輻撫輔賦複負訃婦縛該鈣蓋幹趕稈贛岡剛鋼綱崗臯鎬擱鴿閣鉻個給龔宮鞏貢鈎溝構購夠蠱顧剮關觀館慣貫廣規矽歸龜閨軌詭櫃貴劊輥滾鍋國過駭韓漢閡鶴賀橫轟鴻紅後壺護滬戶嘩華畫劃話懷壞歡環還緩換喚瘓煥渙黃謊揮輝毀賄穢會燴彙諱誨繪葷渾夥獲貨禍擊機積饑譏雞績緝極輯級擠幾薊劑濟計記際繼紀夾莢頰賈鉀價駕殲監堅箋間艱緘繭檢堿鹼揀撿簡儉減薦檻鑒踐賤見鍵艦劍餞漸濺澗漿蔣槳獎講醬膠澆驕嬌攪鉸矯僥腳餃繳絞轎較稭階節莖驚經頸靜鏡徑痙競淨糾廄舊駒舉據鋸懼劇鵑絹傑潔結誡屆緊錦僅謹進晉燼盡勁荊覺決訣絕鈞軍駿開凱顆殼課墾懇摳庫褲誇塊儈寬礦曠況虧巋窺饋潰擴闊蠟臘萊來賴藍欄攔籃闌蘭瀾讕攬覽懶纜爛濫撈勞澇樂鐳壘類淚籬離裏鯉禮麗厲勵礫曆瀝隸倆聯蓮連鐮憐漣簾斂臉鏈戀煉練糧涼兩輛諒療遼鐐獵臨鄰鱗凜賃齡鈴淩靈嶺領餾劉龍聾嚨籠壟攏隴樓婁摟簍蘆盧顱廬爐擄鹵虜魯賂祿錄陸驢呂鋁侶屢縷慮濾綠巒攣孿灤亂掄輪倫侖淪綸論蘿羅邏鑼籮騾駱絡媽瑪碼螞馬罵嗎買麥賣邁脈瞞饅蠻滿謾貓錨鉚貿麽黴沒鎂門悶們錳夢謎彌覓綿緬廟滅憫閩鳴銘謬謀畝鈉納難撓腦惱鬧餒膩攆撚釀鳥聶齧鑷鎳檸獰甯擰濘鈕紐膿濃農瘧諾歐鷗毆嘔漚盤龐國愛賠噴鵬騙飄頻貧蘋憑評潑頗撲鋪樸譜臍齊騎豈啓氣棄訖牽扡釺鉛遷簽謙錢鉗潛淺譴塹槍嗆牆薔強搶鍬橋喬僑翹竅竊欽親輕氫傾頃請慶瓊窮趨區軀驅齲顴權勸卻鵲讓饒擾繞熱韌認紉榮絨軟銳閏潤灑薩鰓賽傘喪騷掃澀殺紗篩曬閃陝贍繕傷賞燒紹賒攝懾設紳審嬸腎滲聲繩勝聖師獅濕詩屍時蝕實識駛勢釋飾視試壽獸樞輸書贖屬術樹豎數帥雙誰稅順說碩爍絲飼聳慫頌訟誦擻蘇訴肅雖綏歲孫損筍縮瑣鎖獺撻擡攤貪癱灘壇譚談歎湯燙濤縧騰謄銻題體屜條貼鐵廳聽烴銅統頭圖塗團頹蛻脫鴕馱駝橢窪襪彎灣頑萬網韋違圍爲濰維葦偉僞緯謂衛溫聞紋穩問甕撾蝸渦窩嗚鎢烏誣無蕪吳塢霧務誤錫犧襲習銑戲細蝦轄峽俠狹廈鍁鮮纖鹹賢銜閑顯險現獻縣餡羨憲線廂鑲鄉詳響項蕭銷曉嘯蠍協挾攜脅諧寫瀉謝鋅釁興洶鏽繡虛噓須許緒續軒懸選癬絢學勳詢尋馴訓訊遜壓鴉鴨啞亞訝閹煙鹽嚴顔閻豔厭硯彥諺驗鴦楊揚瘍陽癢養樣瑤搖堯遙窯謠藥爺頁業葉醫銥頤遺儀彜蟻藝億憶義詣議誼譯異繹蔭陰銀飲櫻嬰鷹應纓瑩螢營熒蠅穎喲擁傭癰踴詠湧優憂郵鈾猶遊誘輿魚漁娛與嶼語籲禦獄譽預馭鴛淵轅園員圓緣遠願約躍鑰嶽粵悅閱雲鄖勻隕運蘊醞暈韻雜災載攢暫贊贓髒鑿棗竈責擇則澤賊贈紮劄軋鍘閘詐齋債氈盞斬輾嶄棧戰綻張漲帳賬脹趙蟄轍鍺這貞針偵診鎮陣掙睜猙幀鄭證織職執紙摯擲幟質鍾終種腫衆謅軸皺晝驟豬諸誅燭矚囑貯鑄築駐專磚轉賺樁莊裝妝壯狀錐贅墜綴諄濁茲資漬蹤綜總縱鄒詛組鑽緻鐘麼為隻兇準啟闆裡靂餘鍊",chinese:function(e){return/.*[\u4e00-\u9fa5]+.*$/.test(e)?this.chinese_traditional_dict.indexOf(e)>-1?"traditional":"simplified":""},japanese:function(e){return!!/.*[\u3040-\u309F\u30A0-\u30FF]+.*$/.test(e)},korean:function(e){return!!/.*[\uAC00-\uD7AF]+.*$/.test(e)},russian:function(e){return!!/^[А-Яа-яЁё]$/.test(e)},thai:function(e){return!!/^[\u0E01-\u0E59]$/.test(e)},arabic:function(e){return/^[\u0600-\u06FF\u0750-\u077F]$/.test(e)},romanian:function(e){return/^[\u00C0-\u00FF\u0100-\u017F\u0218-\u021B]$/.test(e)},greek:function(e){return!!/^[\u0391-\u03A9\u03B1-\u03C9]$/.test(e)},hebrew:function(e){return/^[\u0590-\u05FF]$/.test(e)},number:function(e){return!!/.*[\u0030-\u0039]+.*$/.test(e)},english:function(e){return!!/.*[\u0041-\u005a]+.*$/.test(e)||!!/.*[\u0061-\u007a]+.*$/.test(e)},romance_dict:["é","è","ê","à","ç","œ","ñ","á","ó","ò","ì","ã","õ"],romance:function(e){return this.romance_dict.indexOf(e)>-1},romanceSentenceAnaly:function(e){const t={french:{score:0,chars:["é","è","ê","à","ç","œ"]},spanish:{score:0,chars:["ñ","á","ó"],pairs:["ll"]},italian:{score:0,chars:["ò","ì"],pairs:["cc","ss"]},portuguese:{score:0,chars:["ã","õ"]}};for(let a=0;a<e.length;a++){const n=e[a].toLowerCase();if(Object.keys(t).forEach(e=>{t[e].chars.includes(n)&&(t[e].score+=1)}),a<e.length-1){const n=e.slice(a,a+2).toLowerCase();Object.keys(t).forEach(e=>{const a=t[e].pairs;a&&a.includes(n)&&(t[e].score+=2)})}}let a="",n=-1;return Object.keys(t).forEach(e=>{t[e].score>n&&(n=t[e].score,a=e)}),a||""},specialCharacter:function(e){return!!/.*[\u2460-\u24E9]+.*$/.test(e)||(!!/.*[\u2500-\u25FF]+.*$/.test(e)||(!!/.*[\u3200-\u33FF]+.*$/.test(e)||(!!/.*[\uFF00-\uFF5E]+.*$/.test(e)||(!!/.*[\u2000-\u22FF]+.*$/.test(e)||(!!/.*[\u3001-\u3036]+.*$/.test(e)||(!!/.*[\u0020-\u002F]+.*$/.test(e)||(!!/.*[\u003B\u003B\u003C\u003D\u003E\u003F\u005B\u005C\u005D\u005E\u005F\u0060\u007B\u007C\u007D\u007E]+.*$/.test(e)||(!!/.*[\u0009\u000a\u0020\u00A0\u1680\u180E\u202F\u205F\u3000\uFEFF]+.*$/.test(e)||(!!/.*[\u2000-\u200B]+.*$/.test(e)||!!/.*[\u2C60-\u2C77]+.*$/.test(e))))))))))},textTranslateReplace:function(e,t,a,n){return translate.util.textReplace(e,t,a,n)}},executeByLocalLanguage:function(){var e=translate.util.browserDefaultLanguage();void 0!==e&&e.length>0?translate.changeLanguage(e):"string"!=typeof translate.request.api.ip||null==translate.request.api.ip||translate.request.api.ip.length<1||translate.request.post(translate.request.api.ip,{},function(e){0==e.result?(console.log("==== ERROR 获取当前用户所在区域异常 ===="),console.log(e.info),console.log("==== ERROR END ====")):(translate.storage.set("to",e.language),translate.to=e.language,translate.selectLanguageTag,translate.execute())},null)},util:{textReplace:function(e,t,a,n){if(e==t)return a;let r=0,s=30;for(;e.indexOf(t,r)>-1&&s-- >0;){let s=""+a,l=""+t;if(translate.language.wordBlankConnector(n)){let a=e.indexOf(t,r);if(a+1<e.length){let n=e.charAt(a+t.length);/。/.test(n)?(s+=". ",l=t+"。"):/，/.test(n)?(s+=", ",l=t+"，"):/：/.test(n)?(s+=": ",l=t+"："):-1!==[" ","\n","\t","]","|","_","-","/"].indexOf(n)||s.length>0&&" "==s.charAt(s.length-1)||(s+=" ")}if(a>0){let t=e.charAt(a-1);/。/.test(t)?(s=". "+s,l="。"+l):/，/.test(t)?(s=", "+s,l="，"+l):/：/.test(t)?(s=": "+s,l="："+l):-1!==[" ","\n","\t","[","|","_","-","/"].indexOf(t)||s.length>0&&" "==s.charAt(0)||(s=" "+s)}}let o=translate.util.replaceFromIndex(e,r,l,s);o.replaceEndIndex<1?console.log("while中已经 indexOf发现了，但是实际没有替换，出现异常了！理论上这是不应该出现的。 text:"+e+" , translateOriginal:"+t):(r=o.replaceEndIndex,e=o.text)}return e},replaceFromIndex:function(e,t,a,n){const r=e.slice(0,t),s=e.slice(t),l=s.indexOf(a);if(l>-1){return{text:r+s.replace(a,n),replaceEndIndex:t+l+n.length}}return{text:r+replacedAfter,replaceEndIndex:0}},uuid:function(){var e=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(e+=performance.now()),"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var a=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?a:3&a|8).toString(16)})},findTag:function(e){return/<[^>]+>/g.test(e)},arrayFindMaxNumber:function(e){for(var t={},a=[],n=0,r=0,s=e.length;r<s;r++)t[e[r]]?t[e[r]]++:t[e[r]]=1,t[e[r]]>n&&(n=t[e[r]]);for(var l in t)t.hasOwnProperty(l)&&t[l]===n&&a.push(l);return a},hash:function(e){if(null==e||void 0===e)return e;var t,a=0;if(0===e.length)return a;for(t=0;t<e.length;t++)a=(a<<5)-a+e.charCodeAt(t),a|=0;return a+""},charReplace:function(e){return null==e?"":e=(e=e.trim()).replace(/\t|\n|\v|\r|\f/g,"")},regExp:{pattern:function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/\"/g,'\\"')).replace(/\?/g,"\\?")).replace(/\$/g,"\\$")).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")).replace(/\|/g,"\\|")).replace(/\+/g,"\\+")).replace(/\*/g,"\\*")).replace(/\[/g,"\\[")).replace(/\]/g,"\\]")).replace(/\^/g,"\\^")).replace(/\{/g,"\\{")).replace(/\}/g,"\\}")},resultText:function(e){return e}},getUrlParam:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),a=window.location.search.substr(1).match(t);return null!=a?unescape(a[2]):""},synchronizesLoadJs:function(e){var t=null;if(window.ActiveXObject)try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){t=new ActiveXObject("Microsoft.XMLHTTP")}else window.XMLHttpRequest&&(t=new XMLHttpRequest);if(t.open("GET",e,!1),t.send(null),4==t.readyState){if(t.status>=200&&t.status<300||0==t.status||304==t.status){var a=document.getElementsByTagName("HTML")[0],n=document.createElement("script");n.language="javascript",n.type="text/javascript";try{n.appendChild(document.createTextNode(t.responseText))}catch(e){n.text=t.responseText}return a.appendChild(n),!0}return!1}return!1},loadMsgJs:function(){"undefined"==typeof msg&&translate.util.synchronizesLoadJs("https://res.zvo.cn/msg/msg.js")},objSort:function(e){var t=Array.from(Object.keys(e));t.sort(function(e,t){return t.length-e.length});var a=new Array;for(var n of t)a[n]=e[n];return a},versionStringToInt:function(e){var t=e.split("."),a=0;return a=1e3*parseInt(t[0])*1e3+a,a=1e3*parseInt(t[1])+a,a=parseInt(t[2])+a},split:function(e,t,a){let n=t,r=[];if(JSON.stringify(e).length<=t)r.push(e);else{let a=JSON.stringify(e).trim().substring(1,JSON.stringify(e).length-1);if(JSON.stringify(e).length-t<=2){t-=4;let e=a.substring(0,a.lastIndexOf('","')+1),n=a.substring(a.lastIndexOf('","')+2);r.push(JSON.parse("["+e+"]")),r.push(JSON.parse("["+n+"]"))}else{t-=2;let e=0;for(;e-a.length<0;){let n="",s=(n=e+t-a.length>=0?a.substring(e):a.substring(e,e+t)).length,l=1;if(n.endsWith('"')){if(n.endsWith('","'))s-=2;else if(!n.startsWith('"')){s=n.lastIndexOf('","')+1}}else if(n.endsWith('",'))s-=1;else{(s=n.lastIndexOf('","')+1)<=0&&(s=n.startsWith('"')?n.length-1:n.length-2,n.endsWith('"')||(l=0))}let o="";s-n.length>0||s-0==0?s+=(o=n).length:o=n.substring(0,s),o.startsWith('"')||o.startsWith(',"')||(o='"'+o),o.endsWith('"')||(o+='"'),e+=s+l,o="["+o+"]";try{r.push(JSON.parse(o))}catch(t){e=e-(s+l)+1}}}}return a&&a>0&&(r=translate.util._splitMaxSize(r,n,a)),r},_splitMaxSize:function(e,t,a){let n=[],r=[];if(e.forEach(function(e,s){if((e=r.concat(e)).length>a){let s=e.slice(0,a),l=e.slice(a),o=1;for(;JSON.stringify(s).length>t&&(s=e.slice(0,a-o),l=e.slice(a-o),!(++o>=e.length+1)););n.push(s),r.length=0,r=l}else{let s=e,l=[],o=1;for(;JSON.stringify(s).length>t&&(s=e.slice(0,a-o),l=e.slice(a-o),!(++o>=e.length+1)););n.push(s),r.length=0,r=l}}),r.length>0){let e=[];e.push(r);let s=translate.util._splitMaxSize(e,t,a);n=n.concat(s)}return n},browserLanguage:{zh:"chinese_simplified","zh-CN":"chinese_simplified","zh-TW":"chinese_traditional","zh-HK":"chinese_traditional",co:"corsican",gn:"guarani",rw:"kinyarwanda",ha:"hausa",no:"norwegian",nl:"dutch",yo:"yoruba",en:"english","en-US":"english",kok:"gongen",la:"latin",ne:"nepali",fr:"french",cs:"czech",haw:"hawaiian",ka:"georgian",ru:"russian",fa:"persian",bho:"bhojpuri",hi:"hindi",be:"belarusian",sw:"swahili",is:"icelandic",yi:"yiddish",tw:"twi",ga:"irish",gu:"gujarati",km:"khmer",sk:"slovak",he:"hebrew",kn:"kannada",hu:"hungarian",ta:"tamil",ar:"arabic",bn:"bengali",az:"azerbaijani",sm:"samoan",af:"afrikaans",id:"indonesian",da:"danish",sn:"shona",bm:"bambara",lt:"lithuanian",vi:"vietnamese",mt:"maltese",tk:"turkmen",as:"assamese",ca:"catalan",si:"singapore",ceb:"cebuano",gd:"scottish-gaelic",sa:"sanskrit",pl:"polish",gl:"galician",lv:"latvian",uk:"ukrainian",tt:"tatar",cy:"welsh",ja:"japanese",fil:"filipino",ay:"aymara",lo:"lao",te:"telugu",ro:"romanian",ht:"haitian_creole",doi:"dogrid",sv:"swedish",mai:"maithili",th:"thai",hy:"armenian",my:"burmese",ps:"pashto",hmn:"hmong",dv:"dhivehi",lb:"luxembourgish",sd:"sindhi",ku:"kurdish",tr:"turkish",mk:"macedonian",bg:"bulgarian",ms:"malay",lg:"luganda",mr:"marathi",et:"estonian",ml:"malayalam",de:"deutsch",sl:"slovene",ur:"urdu",pt:"portuguese",ig:"igbo",ckb:"kurdish_sorani",om:"oromo",el:"greek",es:"spanish",fy:"frisian",so:"somali",am:"amharic",ny:"nyanja",pa:"punjabi",eu:"basque",it:"italian",sq:"albanian",ko:"korean",tg:"tajik",fi:"finnish",ky:"kyrgyz",ee:"ewe",hr:"croatian",kri:"creole",qu:"quechua",bs:"bosnian",mi:"maori"},browserDefaultLanguage:function(){var e=navigator.language||navigator.userLanguage;if("string"==typeof e&&e.length>0){var t=translate.util.browserLanguage[e];if(void 0!==t)return t;console.log("browser default language : "+e+", translate.js current translate channel not support this language ")}return""},urlSplitByText:function(e){const t=e.split(/(https?:\/\/[\w\-._~:\/?#[\]@!$&'()*+;=%]+(?=[\s\u4e00-\u9fa5，。；,!?]|$))/gi);let a={};for(let e=0;e<t.length;e++)e%2==0?""!==t[e]&&(a[t[e]]="0"):a[t[e]]="1";return a},getElementPosition:function(e){const t=e.getBoundingClientRect(),a=window.scrollX||document.documentElement.scrollLeft,n=window.scrollY||document.documentElement.scrollTop,r=t.left+a,s=t.top+n,l=t.right-t.left,o=t.bottom-t.top;return{startX:r,startY:s,endX:r+l,endY:s+o,width:l,height:o}}},service:{name:"translate.service",use:function(e){if(void 0===translate.enterprise||1!=translate.enterprise.isUse){if("string"==typeof e&&(translate.service.name=e,"translate.service"!=e)){if(translate.whole.enableAll(),"giteeai"==e.toLowerCase())return void(translate.request.api.host=["https://giteeai.zvo.cn/","https://deutsch.enterprise.api.translate.zvo.cn:1000/","https://api.translate.zvo.cn:1000/"]);if("siliconflow"==e.toLowerCase())return void(translate.request.api.host=["https://siliconflow.zvo.cn/","https://america.api.translate.zvo.cn:1414/","https://deutsch.enterprise.api.translate.zvo.cn:1414/"])}}else console.log("您已启用了企业级翻译通道 translate.enterprise.use(); (文档：https://translate.zvo.cn/4087.html) , 所以您设置的 translate.service.use('"+e+"'); (文档：https://translate.zvo.cn/4081.html) 将失效不起作用，有企业级翻译通道全部接管。")},edge:{api:{auth:"https://edge.microsoft.com/translate/auth",translate:"https://api.cognitive.microsofttranslator.com/translate?from={from}&to={to}&api-version=3.0&includeSentenceLength=true"},language:{json:[{id:"ukrainian",name:"Україна",serviceId:"uk"},{id:"norwegian",name:"Norge",serviceId:"no"},{id:"welsh",name:"Iaith Weleg",serviceId:"cy"},{id:"dutch",name:"nederlands",serviceId:"nl"},{id:"japanese",name:"日本語",serviceId:"ja"},{id:"filipino",name:"Pilipino",serviceId:"fil"},{id:"english",name:"English",serviceId:"en"},{id:"lao",name:"ກະຣຸນາ",serviceId:"lo"},{id:"telugu",name:"తెలుగుName",serviceId:"te"},{id:"romanian",name:"Română",serviceId:"ro"},{id:"nepali",name:"नेपालीName",serviceId:"ne"},{id:"french",name:"Français",serviceId:"fr"},{id:"haitian_creole",name:"Kreyòl ayisyen",serviceId:"ht"},{id:"czech",name:"český",serviceId:"cs"},{id:"swedish",name:"Svenska",serviceId:"sv"},{id:"russian",name:"Русский язык",serviceId:"ru"},{id:"malagasy",name:"Malagasy",serviceId:"mg"},{id:"burmese",name:"ဗာရမ်",serviceId:"my"},{id:"pashto",name:"پښتوName",serviceId:"ps"},{id:"thai",name:"คนไทย",serviceId:"th"},{id:"armenian",name:"Արմենյան",serviceId:"hy"},{id:"chinese_simplified",name:"简体中文",serviceId:"zh-CHS"},{id:"persian",name:"Persian",serviceId:"fa"},{id:"chinese_traditional",name:"繁體中文",serviceId:"zh-CHT"},{id:"kurdish",name:"Kurdî",serviceId:"ku"},{id:"turkish",name:"Türkçe",serviceId:"tr"},{id:"hindi",name:"हिन्दी",serviceId:"hi"},{id:"bulgarian",name:"български",serviceId:"bg"},{id:"malay",name:"Malay",serviceId:"ms"},{id:"swahili",name:"Kiswahili",serviceId:"sw"},{id:"oriya",name:"ଓଡିଆ",serviceId:"or"},{id:"icelandic",name:"ÍslandName",serviceId:"is"},{id:"irish",name:"Íris",serviceId:"ga"},{id:"khmer",name:"ភាសា​ខ្មែរName",serviceId:"km"},{id:"gujarati",name:"ગુજરાતી",serviceId:"gu"},{id:"slovak",name:"Slovenská",serviceId:"sk"},{id:"kannada",name:"ಕನ್ನಡ್Name",serviceId:"kn"},{id:"hebrew",name:"היברית",serviceId:"he"},{id:"hungarian",name:"magyar",serviceId:"hu"},{id:"marathi",name:"मराठीName",serviceId:"mr"},{id:"tamil",name:"தாமில்",serviceId:"ta"},{id:"estonian",name:"eesti keel",serviceId:"et"},{id:"malayalam",name:"മലമാലം",serviceId:"ml"},{id:"inuktitut",name:"ᐃᓄᒃᑎᑐᑦ",serviceId:"iu"},{id:"arabic",name:"بالعربية",serviceId:"ar"},{id:"deutsch",name:"Deutsch",serviceId:"de"},{id:"slovene",name:"slovenščina",serviceId:"sl"},{id:"bengali",name:"বেঙ্গালী",serviceId:"bn"},{id:"urdu",name:"اوردو",serviceId:"ur"},{id:"azerbaijani",name:"azerbaijani",serviceId:"az"},{id:"portuguese",name:"português",serviceId:"pt"},{id:"samoan",name:"lifiava",serviceId:"sm"},{id:"afrikaans",name:"afrikaans",serviceId:"af"},{id:"tongan",name:"汤加语",serviceId:"to"},{id:"greek",name:"ελληνικά",serviceId:"el"},{id:"indonesian",name:"IndonesiaName",serviceId:"id"},{id:"spanish",name:"Español",serviceId:"es"},{id:"danish",name:"dansk",serviceId:"da"},{id:"amharic",name:"amharic",serviceId:"am"},{id:"punjabi",name:"ਪੰਜਾਬੀName",serviceId:"pa"},{id:"albanian",name:"albanian",serviceId:"sq"},{id:"lithuanian",name:"Lietuva",serviceId:"lt"},{id:"italian",name:"italiano",serviceId:"it"},{id:"vietnamese",name:"Tiếng Việt",serviceId:"vi"},{id:"korean",name:"한국어",serviceId:"ko"},{id:"maltese",name:"Malti",serviceId:"mt"},{id:"finnish",name:"suomi",serviceId:"fi"},{id:"catalan",name:"català",serviceId:"ca"},{id:"croatian",name:"hrvatski",serviceId:"hr"},{id:"bosnian",name:"bosnian",serviceId:"bs-Latn"},{id:"polish",name:"Polski",serviceId:"pl"},{id:"latvian",name:"latviešu",serviceId:"lv"},{id:"maori",name:"Maori",serviceId:"mi"}],getMap:function(){if(void 0===translate.service.edge.language.map){translate.service.edge.language.map=new Array;for(var e=0;e<translate.service.edge.language.json.length;e++){var t=translate.service.edge.language.json[e];translate.service.edge.language.map[t.id]=t.serviceId}}return translate.service.edge.language.map}},translate:function(e,t,a,n){var r=JSON.parse(decodeURIComponent(t.text));let s=translate.util.split(r,4e4,900);translate.request.send(translate.service.edge.api.auth,{},{},function(e){var r={from:t.from+"",to:t.to,text:t.text},l=t.from;"auto"!=l&&(l="romance"==l?"fr":translate.service.edge.language.getMap()[t.from]);for(var o=translate.service.edge.language.getMap()[t.to],i=translate.service.edge.api.translate.replace("{from}",l).replace("{to}",o),u=0;u<s.length;u++){for(var d=[],c=0;c<s[u].length;c++)d.push({Text:s[u][c]});translate.request.send(i,JSON.stringify(d),r,function(e){var n={info:"SUCCESS",result:1};n.from=t.from,n.to=t.to,n.text=[];for(var r=0;r<e.length;r++)n.text.push(e[r].translations[0].text);if(s.length>1){for(var l=-1,o=0;o<s.length;o++)if(s[o].length-n.text.length==0){l=o;break}l<0&&(console.log("------ERROR--------"),console.log("翻译内容过多，进行拆分，但拆分判断出现异常，currentIndex：-1 请联系 http://translate.zvo.cn/43006.html 说明"));for(var i=0;i<l;i++)for(var u=s[i].length,d=0;d<u;d++)n.text.unshift(null);for(var c=s.length-1;c>l;c--){var g=s[c].length;for(d=0;d<g;d++)n.text.push(null)}}a(n)},"post",!0,{Authorization:"Bearer "+e,"Content-Type":"application/json"},n,!0)}},"get",!0,{"content-type":"application/x-www-form-urlencoded"},function(e){console.log("---------error--------"),console.log("edge translate service error, http code : "+e.status+", response text : "+e.responseText)},!0)}}},request:{api:{host:["https://api.translate.zvo.cn/","https://america.api.translate.zvo.cn/"],language:"language.json",translate:"translate.json",ip:"ip.json",connectTest:"connectTest.json",init:"init.json"},appendParams:{},appendHeaders:{},response:function(e){},speedDetectionControl:{hostMasterNodeCutTime:2e3,hostQueue:[],hostQueueIndex:-1,disableTime:1e6,setCurrentHost:function(e){translate.storage.set("speedDetectionControl_hostQueue",""),translate.request.api.host=e,translate.request.speedDetectionControl.checkHostQueue=new Array,translate.request.speedDetectionControl.checkResponseSpeed_Storage(e,0)},getHostQueue:function(){if(0==translate.request.speedDetectionControl.hostQueue.length){var e=translate.storage.get("speedDetectionControl_hostQueue");if(null==e||void 0===e||""==e){"string"==typeof translate.request.api.host&&(translate.request.api.host=[""+translate.request.api.host]),translate.request.speedDetectionControl.hostQueue=[];for(var t=0;t<translate.request.api.host.length;t++){var a=translate.request.api.host[t];translate.request.speedDetectionControl.hostQueue[t]={host:a,time:0}}}else translate.request.speedDetectionControl.hostQueue=JSON.parse(e);var n=translate.storage.get("speedDetectionControl_lasttime");null!=n&&void 0!==n||(n=0);(new Date).getTime()-n>6e4&&translate.request.speedDetectionControl.checkResponseSpeed()}return translate.request.speedDetectionControl.hostQueue},checkResponseSpeed_Storage:function(e,t){translate.request.speedDetectionControl.checkHostQueue.push({host:e,time:t}),translate.request.speedDetectionControl.checkHostQueue.sort((e,t)=>e.time-t.time),translate.storage.set("speedDetectionControl_hostQueue",JSON.stringify(translate.request.speedDetectionControl.checkHostQueue)),translate.storage.set("speedDetectionControl_lasttime",(new Date).getTime()),translate.request.speedDetectionControl.hostQueue=translate.request.speedDetectionControl.checkHostQueue},checkResponseSpeed:function(){var e={"content-type":"application/x-www-form-urlencoded"};if(!("string"!=typeof translate.request.api.connectTest||null==translate.request.api.connectTest||translate.request.api.connectTest.length<1)){translate.request.speedDetectionControl.checkHostQueue=[],translate.request.speedDetectionControl.checkHostQueueMap=[],"string"==typeof translate.request.api.host&&(translate.request.api.host=[""+translate.request.api.host]);for(var t=0;t<translate.request.api.host.length;t++){var a=translate.request.api.host[t];translate.request.speedDetectionControl.checkHostQueueMap[a]={start:(new Date).getTime()};try{translate.request.send(a+translate.request.api.connectTest,{host:a},{host:a},function(e){var t=e.info,a=translate.request.speedDetectionControl.checkHostQueueMap[t],n=(new Date).getTime()-a.start;translate.request.api.host[0]==t&&(n-=translate.request.speedDetectionControl.hostMasterNodeCutTime)<0&&(n=0),translate.request.speedDetectionControl.checkResponseSpeed_Storage(t,n)},"post",!0,e,function(e){var t=e.requestURL.replace(translate.request.api.connectTest,"");translate.request.speedDetectionControl.checkResponseSpeed_Storage(t,translate.request.speedDetectionControl.disableTime)},!1)}catch(e){console.log(e)}}}},getHostQueueIndex:function(){if(translate.request.speedDetectionControl.hostQueueIndex<0){var e=translate.storage.get("speedDetectionControl_hostQueueIndex");void 0===e||null==e?(translate.request.speedDetectionControl.hostQueueIndex=0,translate.storage.set("speedDetectionControl_hostQueueIndex",0)):translate.request.speedDetectionControl.hostQueueIndex=e}return translate.request.speedDetectionControl.hostQueueIndex},getHost:function(){var e=translate.request.speedDetectionControl.getHostQueue(),t=translate.request.speedDetectionControl.getHostQueueIndex();return e.length>t||(console.log("异常，下标越界了！index："+t),t=e.length-1),e[t].host}},getUrl:function(e){return translate.request.speedDetectionControl.getHost()+e+"?v="+translate.version},post:function(e,t,a,n){if(void 0!==t){void 0!==translate.enterprise&&translate.enterprise.automaticAdaptationService();translate.request.getUrl(e);if("client.edge"==translate.service.name){if(e==translate.request.api.translate)return void translate.service.edge.translate(e,t,a,n);if(e==translate.request.api.language){var r={info:"SUCCESS",result:1};return r.list=translate.service.edge.language.json,void a(r)}}this.send(e,t,t,a,"post",!0,{"content-type":"application/x-www-form-urlencoded"},n,!0)}},send:function(e,t,a,n,r,s,l,o,i){var u="";if(null!=t&&void 0!==t||(t={}),"string"==typeof t)u=t;else{for(var d in t.browserDefaultLanguage=translate.util.browserDefaultLanguage(),translate.request.appendParams)translate.request.appendParams.hasOwnProperty(d)&&(t[d]=translate.request.appendParams[d]);for(var c in void 0!==translate.enterprise&&void 0!==translate.enterprise.key&&"string"==typeof translate.enterprise.key&&translate.enterprise.key.length>0&&(t.key=translate.enterprise.key),t)t.hasOwnProperty(c)&&(u.length>0&&(u+="&"),u=u+c+"="+t[c])}0==e.indexOf("https://")||0==e.indexOf("http://")||(e=translate.request.getUrl(e));var g=null;try{g=new XMLHttpRequest}catch(e){g=new ActiveXObject("Microsoft.XMLHTTP")}if(g.data=a,g.open(r,e,s),null!=l)for(var c in l)l.hasOwnProperty(c)&&g.setRequestHeader(c,l[c]);for(var h in translate.request.appendHeaders)translate.request.appendHeaders.hasOwnProperty(h)&&g.setRequestHeader(h,translate.request.appendHeaders[h]);return"translate.service"==translate.service.name&&g.setRequestHeader("currentpage",window.location.href+""),g.send(u),g.onreadystatechange=function(){if(4==g.readyState)if(translate.request.response(g),200==g.status){var a=null;if(void 0===g.responseText||null==g.responseText);else if(g.responseText.indexOf("{")>-1&&g.responseText.indexOf("}")>-1)try{a=JSON.parse(g.responseText)}catch(e){console.log(e)}n(null==a?g.responseText:a)}else i&&(e.indexOf(translate.request.api.connectTest)>-1||("translate.service"==translate.service.name&&console.log("----- translate.js 提示 -----\n翻译服务响应异常，解决这种情况可以有两种方案：\n【方案一】：使用采用最新版本 3.16.0及更高版本，js引用文件为 https://cdn.staticfile.net/translate.js/3.16.0/translate.js 并且使用 client.edge 模式 （增加一行设置代码就好，可参考 https://translate.zvo.cn/4081.html ），这样就不会再出现这种情况了，而且这个方案也是完全免费的。 \n【方案二】：采用企业级稳定翻译通道 ,但是这个相比于 方案一 来说，是有一定的收费的，大概一年600，这个就是专门为了高速及高稳定准备的，而相比于这个方案二，方案一则是全免费的。 因为方案二我们是部署了两个集群，而每个集群又下分了数个网络节点，包含中国大陆、香港、美国、欧洲、 等多个州，充分保障稳定、高效，同样也产生了不少成本，所以才需要付费。更多信息说明可以参考： http://translate.zvo.cn/4087.html \n【方案三】：私有部署你自己的翻译通道，并且启用内存级翻译缓存，毫秒级响应，但是需要依赖一台1核2G服务器，是最推荐的方式。具体参考：https://translate.zvo.cn/391129.html\n-------------"),console.log("------- translate.js service api response error --------"),console.log("    http code : "+g.status),console.log("    response : "+g.response),console.log("    request url : "+e),console.log("    request data : "+JSON.stringify(t)),console.log("    request method : "+r),console.log("---------------------- end ----------------------"))),g.requestURL=e,null!=o&&o(g)},g},translateText:function(e,t){var a=new Array,n=translate.language.getLocal(),r=translate.language.getCurrent();if("string"==typeof e)a[0]=e;else{var s=Object.prototype.toString.call(e);if("[object Array]"==s)a=e;else{if("[object Object]"!=s)return void console.log("translate.request.translateText 传入的值类型错误，请查阅文档： https://translate.zvo.cn/4077.html");void 0===e.texts&&console.log("translate.request.translateText 传入的值类型异常，因为你没有传入 obj.texts 要翻译的具体文本！ 请查阅文档： https://translate.zvo.cn/4077.html"),a="string"==typeof e.texts?[e.texts]:e.texts,"string"==typeof e.from&&e.from.length>0&&(n=e.from),"string"==typeof e.to&&e.to.length>0&&(r=e.to)}}for(var l=new Array,o=[],i={},u=0;u<a.length;u++){var d=translate.util.hash(a[u]),c=translate.storage.get("hash_"+r+"_"+d);null!=c&&c.length>0?l[u]=c:(l[u]="",o.push(a[u]),i[d]=u)}if(0!=o.length){if(!("string"!=typeof translate.request.api.translate||null==translate.request.api.translate||translate.request.api.translate.length<1)){var g=translate.request.api.translate,h={from:n,to:r,text:encodeURIComponent(JSON.stringify(o))};translate.request.post(g,h,function(e){0==e.result&&(console.log("=======ERROR START======="),console.log("from : "+e.from),console.log("to : "+e.to),console.log("translate text array : "+a),console.log("response : "+e.info),console.log("=======ERROR END  ======="));for(var n=0;n<e.text.length;n++){var s=translate.util.hash(o[n]);translate.storage.set("hash_"+r+"_"+s,e.text[n]),translate.office.fullExtract.isUse&&translate.office.fullExtract.set(s,o[n],h.to,e.text[n]),l[i[s]]=e.text[n]}e.text=l,t(e)},null)}}else t(h={from:n,to:r,text:l,result:1})},listener:{minIntervalTime:800,lasttime:0,executetime:0,delayExecuteTime:200,addExecute:function(){var e=Date.now();0==translate.request.listener.lasttime?(translate.request.listener.executetime=e,translate.request.listener.lasttime=1):translate.request.listener.executetime>1||(e<translate.request.listener.lasttime+translate.request.listener.minIntervalTime?translate.request.listener.executetime=translate.request.listener.lasttime+translate.request.listener.minIntervalTime:translate.request.listener.executetime=e)},trigger:function(e){return!0},start:function(){if(void 0!==translate.request.listener.isStart)return;if(translate.request.listener.isStart=!0,setInterval(function(){var e=Date.now();if(translate.request.listener.executetime>1&&e>translate.request.listener.executetime+translate.request.listener.delayExecuteTime){translate.request.listener.executetime=0,translate.request.listener.lasttime=e;try{translate.execute()}catch(e){console.log(e)}}},100),"undefined"==typeof PerformanceObserver)return void console.log("因浏览器版本较低， translate.request.listener.start() 中 PerformanceObserver 对象不存在，浏览器不支持，所以 translate.request.listener.start() 未生效。");const e=new PerformanceObserver(e=>{for(var t=!1,a=0;a<e.getEntries().length;a++){var n=e.getEntries()[a];if("fetch"===n.initiatorType||"xmlhttprequest"===n.initiatorType){var r=n.name;"string"==typeof translate.request.api.host&&(translate.request.api.host=[translate.request.api.host]);for(var s=!1,l=0;l<translate.request.api.host.length;l++)if(r.indexOf(translate.request.api.host[l])>-1){s=!0;break}if(void 0!==translate.service.edge&&r.indexOf(translate.service.edge.api.auth)>-1&&(s=!0),r.indexOf(".microsofttranslator.com/translate")>-1&&(s=!0),s)continue;if(!translate.request.listener.trigger())continue;t=!0;break}}t&&translate.request.listener.addExecute()});var t=PerformanceObserver.supportedEntryTypes;if(t){for(var a=!1,n=0;n<t.length;n++)if("resource"===t[n]){a=!0;break}if(a)try{return void e.observe({entryTypes:["resource"]})}catch(e){console.log("PerformanceObserver entryTypes 失败，尝试 type 参数")}}try{e.observe({type:"resource",buffered:!0}),console.log("使用 PerformanceObserver type")}catch(e){console.log("当前浏览器不支持 PerformanceObserver 的任何参数, translate.request.listener.start() 未启动")}}}},storage:{IndexedDB:{db:null,initDB:function(){const e=this;return new Promise((t,a)=>{const n=indexedDB.open("translate.js",1);n.onupgradeneeded=function(e){const t=e.target.result;t.objectStoreNames.contains("kvStore")||t.createObjectStore("kvStore",{keyPath:"key"})},n.onsuccess=function(a){e.db=a.target.result,t()},n.onerror=function(e){a("IndexedDB 打开失败")}})},set:async function(e,t){return this.db||await this.initDB(),new Promise((a,n)=>{const r=this.db.transaction("kvStore","readwrite").objectStore("kvStore"),s={key:e,value:t},l=r.put(s);l.onsuccess=(()=>a()),l.onerror=(()=>n("写入失败"))})},get:async function(e){return this.db||await this.initDB(),new Promise((t,a)=>{const n=this.db.transaction("kvStore","readonly").objectStore("kvStore").get(e);n.onsuccess=(()=>{const e=n.result;t(e?e.value:void 0)}),n.onerror=(()=>a("读取失败"))})},list:async function(e=""){return this.db||await this.initDB(),new Promise((t,a)=>{const n=this.db.transaction("kvStore","readonly").objectStore("kvStore").openCursor(),r=[],s="^"+e.replace(/\*/g,".*")+"$",l=new RegExp(s);n.onsuccess=(e=>{const a=e.target.result;a?(l.test(a.key)&&r.push({key:a.key,value:a.value.value}),a.continue()):t(r)}),n.onerror=(()=>a("游标读取失败"))})}},set:function(e,t){localStorage.setItem(e,t)},get:function(e){return localStorage.getItem(e)}},images:{queues:[],add:function(e){for(var t in e)e.hasOwnProperty(t)&&(translate.images.queues[t]=e[t])},execute:function(){if(!(Object.keys(translate.images.queues).length<1)){for(var e=document.getElementsByTagName("img"),t=0;t<e.length;t++){var a=e[t];if(void 0!==a.src&&null!=a.src&&0!=a.src.length){var n=a.getAttribute("src");for(var r in translate.images.queues){var s=r,l=translate.images.queues[r];s==n&&(l=l.replace(new RegExp("{language}","g"),translate.to),a.src=l)}}}var o=document.getElementsByTagName("*");for(t=0;t<o.length;t++){var i=o[t],u=window.getComputedStyle(i,null).backgroundImage;if("none"!=u){var d=translate.images.gainCssBackgroundUrl(u);if(void 0!==translate.images.queues[d])l=(l=translate.images.queues[d]).replace(new RegExp("{language}","g"),translate.to),i.style.backgroundImage='url("'+l+'")'}}}},gainCssBackgroundUrl:function(e){var t=e.indexOf('"'),a=e.lastIndexOf('"');return-1!=t&&-1!=a?e.substring(t+1,a):e}},reset:function(){var e=translate.language.getCurrent(),t="";for(var a in translate.nodeQueue)translate.nodeQueue.hasOwnProperty(a)&&(t=a);if(""!=t){for(var n in translate.nodeQueue[t].list)if(translate.nodeQueue[t].list.hasOwnProperty(n))for(var r in translate.nodeQueue[t].list[n])if(translate.nodeQueue[t].list[n].hasOwnProperty(r)){var s=translate.nodeQueue[t].list[n][r];for(var l in s.nodes)if(s.nodes.hasOwnProperty(l)){var o=translate.storage.get("hash_"+e+"_"+r);if(void 0!==o&&null!=o&&0!=o.length&&void 0!==s.nodes[l].node){var i=void 0===s.nodes[l].node.attribute?null:s.nodes[l].node.attribute,u=translate.element.nodeAnalyse.analyse(s.nodes[l].node,"","",i);translate.element.nodeAnalyse.analyse(s.nodes[l].node,u.text,s.original,i)}}}translate.storage.set("to",""),translate.to=null,translate.selectLanguageTag.render()}else console.log("提示，你当前还未执行过翻译，所以你无需执行 translate.reset(); 进行还原。")},selectionTranslate:{selectionX:0,selectionY:0,callTranslate:function(e){let t=window.getSelection();if(t.anchorOffset==t.focusOffset)return;let a=window.getSelection().toString();if("string"!=typeof translate.request.api.translate||null==translate.request.api.translate||translate.request.api.translate.length<1)console.log("已设置了不使用 translate 翻译接口，翻译请求被阻止");else{var n=translate.request.api.translate,r={from:translate.language.getLocal(),to:translate.to,text:encodeURIComponent(JSON.stringify([a]))};translate.request.post(n,r,function(e){if(0==e.result)return;let t=document.querySelector("#translateTooltip");t.innerText=e.text[0],t.style.top=selectionY+20+"px",t.style.left=selectionX+50+"px",t.style.display=""},null)}},start:function(){let e=document.createElement("span");e.innerText="",e.setAttribute("id","translateTooltip"),e.setAttribute("style","background-color:black;color:#fff;text-align:center;border-radius:6px;padding:5px;position:absolute;z-index:999;top:150%;left:50%; "),document.body.appendChild(e),document.addEventListener("mousedown",e=>{selectionX=e.pageX,selectionY=e.pageY},!1),document.addEventListener("mouseup",translate.selectionTranslate.callTranslate,!1),document.addEventListener("click",e=>{document.querySelector("#translateTooltip").style.display="none"},!1)}},enterprise:{isUse:!1,use:function(){if(translate.enterprise.isUse=!0,translate.request.speedDetectionControl.hostMasterNodeCutTime=300,translate.request.api.host=["https://america-enterprise-api-translate.zvo.cn/","https://beijing.enterprise.api.translate.zvo.cn/","https://deutsch.enterprise.api.translate.zvo.cn/","https://america.api.translate.zvo.cn:666/","https://api.translate.zvo.cn:666/","https://api.translate.zvo.cn:888/"],"client.edge"==translate.service.name)return translate.service.name="translate.service",void console.log("您已启用了企业级翻译通道 translate.enterprise.use(); (文档：https://translate.zvo.cn/4087.html) , 所以您设置的 translate.service.use('client.edge'); (文档：https://translate.zvo.cn/4081.html) 将失效不起作用，有企业级翻译通道全部接管。")},automaticAdaptationService:function(){if(translate.enterprise.isUse){var e=translate.request.speedDetectionControl.getHostQueue();e.length>0&&e[0].time+1>translate.request.speedDetectionControl.disableTime&&(translate.service.name="client.edge")}},key:""},init:function(){if(void 0===translate.init_execute&&(translate.init_execute="已进行",!("string"!=typeof translate.request.api.init||null==translate.request.api.init||translate.request.api.init.length<1)))try{translate.request.send(translate.request.api.init,{},{},function(e){0!=e.result?1==e.result&&translate.util.versionStringToInt(e.version)>translate.util.versionStringToInt(translate.version.replace("v",""))&&console.log("Tip : translate.js find new version : "+e.version):console.log("translate.js init 初始化异常："+e.info)},"post",!0,null,function(e){},!1)}catch(e){}},progress:{style:"\n\t\t\t/* CSS部分 */\n\t\t\t/* 灰色水平加载动画 */\n\t\t\t.translate_api_in_progress {\n\t\t\t  position: relative;\n\t\t\t  overflow: hidden; /* 隐藏超出部分的动画 */\n\t\t\t}\n\n\t\t\t/* 蒙版层 */\n\t\t\t.translate_api_in_progress::after {\n\t\t\t  content: '';\n\t\t\t  position: absolute;\n\t\t\t  top: 0;\n\t\t\t  left: 0;\n\t\t\t  width: 100%;\n\t\t\t  height: 100%;\n\t\t\t  background: rgba(255, 255, 255, 1); /* 半透明白色遮罩 */\n\t\t\t  z-index: 2;\n\t\t\t}\n\n\t\t\t/* 水平加载条动画 */\n\t\t\t.translate_api_in_progress::before {\n\t\t\t  content: '';\n\t\t\t  position: absolute;\n\t\t\t  top: 50%;\n\t\t\t  left: 0;\n\t\t\t  width: 100%;\n\t\t\t  height:100%; /* 细线高度 */\n\t\t\t  background: linear-gradient(\n\t\t\t    90deg,\n\t\t\t    transparent 0%,\n\t\t\t    #e8e8e8 25%,  /* 浅灰色 */\n\t\t\t    #d0d0d0 50%,  /* 中灰色 */\n\t\t\t    #e8e8e8 75%,  /* 浅灰色 */\n\t\t\t    transparent 100%\n\t\t\t  );\n\t\t\t  background-size: 200% 100%;\n\t\t\t  animation: translate_api_in_progress_horizontal-loader 3.5s linear infinite;\n\t\t\t  z-index: 3;\n\t\t\t  transform: translateY(-50%);\n\t\t\t}\n\n\t\t\t@keyframes translate_api_in_progress_horizontal-loader {\n\t\t\t  0% {\n\t\t\t    background-position: 200% 0;\n\t\t\t  }\n\t\t\t  100% {\n\t\t\t    background-position: -200% 0;\n\t\t\t  }\n\t\t\t}\n\t\t",api:{isTip:!0,setUITip:function(e){translate.progress.api.isTip=e},removeChildClass:function(e,t){var a=e.childNodes;if(null==a||void 0===a);else if(a.length>0)for(var n=0;n<a.length;n++)translate.progress.api.removeChildClass(a[n],t+1);1!=t&&void 0!==e&&"string"==typeof e.className&&(e.className.indexOf("translate_api_in_progress")<-1||(e.className=e.className.replace(/translate_api_in_progress/g,"")))},startUITip:function(){var e=document.getElementById("translatejs-text-element-hidden");if(void 0===e||null==e){const e=document.createElement("style");e.textContent=" .translatejs-text-element-hidden{color: transparent !important; text-shadow: none !important;}",e.id="translatejs-text-element-hidden",document.head.appendChild(e)}var t=document.getElementById("translatejs-mask-layer-animation");if(void 0===t||null==t){const e=document.createElement("style");e.textContent=translate.progress.style,e.id="translatejs-mask-layer-animation",document.head.appendChild(e)}translate.progress.api.isTip&&(translate.listener.execute.renderStartByApi.push(function(e,t,a){var n=new Array;for(var r in translate.nodeQueue[e].list[t])if(translate.nodeQueue[e].list[t].hasOwnProperty(r))for(var s in translate.nodeQueue[e].list[t][r].nodes)if(translate.nodeQueue[e].list[t][r].nodes.hasOwnProperty(s)){var l=translate.nodeQueue[e].list[t][r].nodes[s].node;void 0!==l&&void 0!==l.parentNode&&n.push(l)}for(var o=0;o<n.length;o++)if(1===n[o].nodeType)n[o].className=n[o].className+" translatejs-text-element-hidden";else{if(null==(c=n[o].parentNode))continue;if(void 0!==c.className&&null!=c.className&&c.className.indexOf("translatejs-text-element-hidden")>-1)continue;c.className=c.className+" translatejs-text-element-hidden"}var i=translate.visual.getRects(n),u=translate.visual.rectsToOneArray(i),d=translate.visual.filterRectsByLineInterval(u,2);for(o=0;o<d.length;o++)if(1===d[o].node.nodeType)d[o].node.className=d[o].node.className+" translate_api_in_progress";else{var c;if(null==(c=d[o].node.parentNode))continue;if(void 0!==c.className&&null!=c.className&&c.className.indexOf("translate_api_in_progress")>-1)continue;c.className=c.className+" translate_api_in_progress"}}),translate.listener.execute.renderFinishByApi.push(function(e,t,a){for(var n in translate.nodeQueue[e].list[t])if(translate.nodeQueue[e].list[t].hasOwnProperty(n))for(var r in translate.nodeQueue[e].list[t][n].nodes)if(translate.nodeQueue[e].list[t][n].nodes.hasOwnProperty(r)){var s,l=translate.nodeQueue[e].list[t][n].nodes[r].node;if(1===l.nodeType)s=l;else if(null==(s=l.parentNode))continue;void 0!==s.className&&null!=s.className&&(s.className.indexOf("translate_api_in_progress")>-1&&(s.className=s.className.replace(/translate_api_in_progress/g,"")),s.className.indexOf("translatejs-text-element-hidden")>-1&&(s.className=s.className.replace(/translatejs-text-element-hidden/g,"")))}}))}}},js:{transString:function(jsString,targetLanguage,successFunction,failureFunction){let jsObject;try{jsObject=JSON.parse(jsString)}catch(e){try{jsObject=eval("("+jsString+")")}catch(e){return console.log(e),void failureFunction(e)}}translate.js.transObject(jsObject,targetLanguage,successFunction,failureFunction)},transObject:function(e,t,a,n){let r=translate.js.find(e),s=r.stringResult;var l=new Array;for(const e in s)l.push(e);var o=new Array,i={from:"auto",to:t,texts:l};if(translate.ignore.text.length>0){for(var u=new Array,d="",c=0;c<translate.ignore.text.length;c++)if(0!=translate.ignore.text[c].trim().length){var g=translate.ignore.text[c];g.indexOf(".")>-1&&(g=g.replaceAll(/\./g,"\\.")),g.indexOf("$")>-1&&(g=g.replaceAll(/\$/g,"\\$")),""!=d&&(d+="|"),d+=g}for(var h=new RegExp(d,"g"),f=0;f<l.length;f++){var p=l[f].split(h);if(p.length>1){!0;for(var m=0;m<p.length;m++)p[m].length>0&&(u.push(p[m]),o[u.length-1]={index:f,original:p[m],isSplit:!0})}else u.push(l[f]),o[u.length-1]={index:f,original:l[f],isSplit:!1}}i.texts=u}translate.request.translateText(i,function(t){if(void 0!==t.result&&0!=t.result)if(0!=t.result){var i;if(translate.ignore.text.length>0){i=new Array;for(var u=0;u<t.text.length;u++){var d=o[u].index;i.length<d+1&&i.push(l[d]),i[d]=translate.util.textReplace(i[d],o[u].original,t.text[u],t.to)}}else i=t.text;if(i&&i.length===l.length?l.forEach((t,a)=>{const n=i[a],r=s[t];r&&r.length>0&&r.forEach(t=>{translate.js.setValueByPath(e,t,n)})}):console.error("翻译结果长度不匹配或为空"),Object.keys(r.functionResult).length>0)for(var c in r.functionResult)r.functionResult.hasOwnProperty(c)&&translate.js.setValueByPath(e,c,r.functionResult[c]);a(e)}else n(t.info);else n("network connect failure")})},setValueByPath:function(e,t,a){const n=t.replace(/\[(\d+)\]/g,".$1").split(".");let r=e;for(let e=0;e<n.length-1;e++)r=r[n[e]];r[n[n.length-1]]=a},find:function(e,t=""){let a={},n={};if("object"==typeof e&&null!==e)if(Array.isArray(e))e.forEach((e,r)=>{const s=t?`${t}[${r}]`:`[${r}]`,l=translate.js.find(e,s),o=l.stringResult;for(const[e,t]of Object.entries(o))a[e]||(a[e]=[]),a[e]=a[e].concat(t);const i=l.functionResult;for(var u in i)i.hasOwnProperty(u)&&(n[u]=i[u])});else for(const s in e){const l=t?`${t}.${s}`:s;if("object"==typeof e[s]&&null!==e[s]){const t=translate.js.find(e[s],l),o=t.stringResult;for(const[e,t]of Object.entries(o))a[e]||(a[e]=[]),a[e]=a[e].concat(t);const i=t.functionResult;for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])}else"string"==typeof e[s]?(void 0===a[e[s]]&&(a[e[s]]=[]),a[e[s]].push(l)):"function"==typeof e[s]&&(n[l]=e[s])}else"string"==typeof e&&(void 0===a[e]&&(a[e]=[]),a[e].push(t));return{stringResult:a,functionResult:n}},objToString:function(e,t){return JSON.stringify(e,(e,t)=>"function"==typeof t?t.toString():t,t).replace(/\\n/g,"\n")}},network:{originalOpen:XMLHttpRequest.prototype.open,originalSend:XMLHttpRequest.prototype.send,setRequestHeaderOriginal:XMLHttpRequest.prototype.setRequestHeader,rules:[{url:/https:\/\/www\.guanleiming\.com\/a\/b\/.html/,methods:["GET","POST"],params:["a","b1"]}],getRuleMatch:function(e,t){for(let a=0;a<translate.network.rules.length;a++){const n=translate.network.rules[a];if(void 0!==n.url||""!=n.url){if(n.url.test(e)&&n.methods.includes(t.toUpperCase()))return n}else console.log("WARINNG : translate.network.rule find url is null:"),console.log(n)}return null},use:function(){XMLHttpRequest.prototype.open=function(...e){return translate.network.hookOpen.apply(this,e)},XMLHttpRequest.prototype.send=function(...e){return translate.network.hookSend.apply(this,e)},XMLHttpRequest.prototype.setRequestHeader=function(...e){return translate.network.setRequestHeader.apply(this,e)},translate.network.fetch.use()},_translateText:e=>translate.language.getLocal()==translate.language.getCurrent()||"string"==typeof e&&e.length>0&&translate.language.recognition(e).languageName==translate.language.getLocal()?new Promise((t,a)=>{t({from:"auto",to:translate.language.getLocal(),text:[e]})}):new Promise((t,a)=>{const n={from:"auto",to:translate.language.getLocal(),texts:[e]};translate.request.translateText(n,function(e){1===e.result?t(e):a(e)})}),setRequestHeader:function(e,t){return this._requestContext&&(this._requestContext.headers=this._requestContext.headers||{},this._requestContext.headers[e]=t),translate.network.setRequestHeaderOriginal.call(this,e,t)},RequestHandler:{async handleGet(e,t){void 0===t.params&&void 0===t.params.length&&t.params.length<1&&(console.log("WARINNG: rule not find params , rule : "),console.log(t),t.params=[]);try{const r=new URL(e,window.location.origin),s=r.searchParams;for(var a=0;a<t.params.length;a++){var n=t.params[a];if(s.has(n)){const e=s.get(n),t=await translate.network._translateText(e);void 0===t?console.log("WARINNG: translateResultData is undefined"):void 0===t.result?console.log("WARINNG: translateResultData.result is undefined"):1!=t.result?console.log("WARINNG: translateResultData.result failure : "+t.info):s.set(n,decodeURIComponent(t.text[0]))}}return r.toString()}catch(t){return console.warn("GET处理失败:",t),e}},async handleForm(e,t){try{const a=new URLSearchParams(e),n={...a};for(const e of t.params)if(a.has(e)){const t=a.get(e),r=await translate.network._translateText(t);n[e]=r}return new URLSearchParams(n).toString()}catch(t){return console.warn("表单处理失败:",t),e}},async handleJson(e,t){try{const a={...JSON.parse(e)};for(const e of t.params)if(a.hasOwnProperty(e)){const t=a[e];a[e]=await translate.network._translateText(t)}return JSON.stringify(a)}catch(t){return console.warn("JSON处理失败:",t),e}}},_requestContext:null,hookOpen(e,t,a,n,r){return this._requestContext={method:e.toUpperCase(),originalUrl:t,async:a,user:n,password:r,matchedRule:translate.network.getRuleMatch(t,e)},translate.network.originalOpen.call(this,e,t,a,n,r)},hookSend(e){const t=this._requestContext;if(!t||!t.matchedRule)return translate.network.originalSend.call(this,e);const a=async()=>{let a=e;const n=t.method;try{const s=await translate.network.RequestHandler.handleGet(t.originalUrl,t.matchedRule);if(translate.network.originalOpen.call(this,n,s,t.async,t.user,t.password),t.headers)for(const e in t.headers)translate.network.setRequestHeaderOriginal.call(this,e,t.headers[e]);if("POST"===n&&void 0!==e&&null!=e&&e.length<2e3){var r=!1;if(0==e.trim().indexOf("[")||0==e.trim().indexOf("{"))try{a=await translate.network.RequestHandler.handleJson(e,t.matchedRule),r=!0}catch(e){r=!1}if(!r)try{a=await translate.network.RequestHandler.handleForm(e,t.matchedRule)}catch(e){}}}catch(e){console.warn("请求处理异常:",e)}translate.network.originalSend.call(this,a)};!1!==t.async?a.call(this):(console.warn("同步请求不支持翻译拦截"),translate.network.originalSend.call(this,e))},fetch:{originalFetch:window.fetch,use:function(){const e=this;window.fetch=function(...t){return e.hookFetch.apply(e,t)}},hookFetch:async function(e,t){const a=new Request(e,t),n=a.url,r=a.method,s=translate.network.getRuleMatch(n,r);if(!s)return this.originalFetch.call(window,a);const l={method:r,url:n,headers:{},rule:s,isModified:!1};a.headers.forEach((e,t)=>{l.headers[t]=e}),this._requestContext=l;try{const e=await translate.network.RequestHandler.handleGet(n,s);if("GET"===r){const t=new Request(e,{method:r,headers:new Headers(l.headers),mode:a.mode,credentials:a.credentials,cache:a.cache,redirect:a.redirect,referrer:a.referrer,referrerPolicy:a.referrerPolicy});return this.originalFetch.call(window,t)}if("POST"===r){let t=null;a.body&&(t=await a.clone().text());a.headers.get("Content-Type");let n=t;if(void 0!==t&&null!=t&&t.length<2e3){var o=!1;if(0==t.trim().indexOf("[")||0==t.trim().indexOf("{"))try{n=await translate.network.RequestHandler.handleJson(t,s),o=!0}catch(e){o=!1}if(!o)try{n=await translate.network.RequestHandler.handleForm(t,s)}catch(e){}}const i=new Request(e,{method:r,headers:new Headers(l.headers),body:n,mode:a.mode,credentials:a.credentials,cache:a.cache,redirect:a.redirect,referrer:a.referrer,referrerPolicy:a.referrerPolicy});return this.originalFetch.call(window,i)}return this.originalFetch.call(window,a)}catch(e){return console.warn("fetch 请求处理异常:",e),this.originalFetch.call(window,a)}},_requestContext:null}},visual:{getRects:function(e){return e.map(e=>{if(!e)return[];let t=[];if(e.nodeType===Node.TEXT_NODE){const a=document.createRange();a.selectNodeContents(e);const n=a.getClientRects();t=Array.from(n).map(t=>({node:e,left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height,lineIndex:Array.from(n).indexOf(t)}))}else if(e.nodeType===Node.ELEMENT_NODE){const a=e.getBoundingClientRect();t=a?[{node:e,left:a.left,top:a.top,right:a.right,bottom:a.bottom,width:a.width,height:a.height}]:[]}return t})},rectsToOneArray:function(e){for(var t=new Array,a=0;a<e.length;a++)for(var n=0;n<e[a].length;n++)t.push(e[a][n]);return t},filterRectsByLineInterval:function(e,t){if(!Array.isArray(e)||"number"!=typeof t||t<1)return console.error("输入参数无效，请确保rects是数组且line是大于0的数字"),[];const a=e.map(e=>e&&void 0!==e.top?{...e,rowBase:Math.round(e.top)}:null).filter(Boolean),n=new Map;a.forEach(e=>{const t=e.rowBase;n.has(t)||n.set(t,[]),n.get(t).push(e)});const r=Array.from(n.entries()).sort((e,t)=>e[0]-t[0]).map(e=>e[1]),s=[];return r.forEach((e,a)=>{a%t==0&&e.length>0&&s.push(e[0])}),s},coordinateSort:function(e){return e.filter(e=>null!==e).sort((e,t)=>Math.abs(e.top-t.top)<5?e.left-t.left:e.top-t.top)},afterAdjacent:function(e){var t=translate.visual.coordinateSort(e);const a=[];return translate.visual.groupRectsByLine(t).forEach(e=>{for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){const r=e[t],s=e[n];if(!translate.visual.areHorizontallyAdjacent(r,s))break;a.push({before:r,after:s})}}),a},groupRectsByLine:function(e){const t=[];let a=[];return e.forEach(e=>{if(0===a.length)a.push(e);else{const n=a[a.length-1];Math.abs(e.top-n.top)<5?a.push(e):(t.push(a),a=[e])}}),a.length>0&&t.push(a),t},areHorizontallyAdjacent:function(e,t){const a=Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top),n=t.left-e.right;return a>0&&Math.abs(n)<1},afterAddSpace:function(e){const t=[];return e.forEach(e=>{const{before:a,after:n}=e,r=a.node,s=n.node,l=window.getComputedStyle(r.nodeType===Node.TEXT_NODE?r.parentElement:r),o=window.getComputedStyle(s.nodeType===Node.TEXT_NODE?s.parentElement:s),i=parseFloat(l.marginRight)>0||parseFloat(l.paddingRight)>0,u=parseFloat(o.marginLeft)>0||parseFloat(o.paddingLeft)>0;i||u||"string"==typeof r.textContent&&"string"==typeof s.textContent&&(/\s$/.test(r.textContent)||/^\s/.test(s.textContent)||t.push(r))}),t},adjustTranslationSpaces:function(e){if(!translate.language.wordBlankConnector(translate.to))return;const t=translate.visual.getRects(e);var a=translate.visual.rectsToOneArray(t);const n=translate.visual.afterAdjacent(a);translate.visual.afterAddSpace(n).forEach(e=>{if(e.nodeType===Node.TEXT_NODE)e.textContent=e.textContent+" ";else if(e.nodeType===Node.ELEMENT_NODE){const t=e.lastChild;t&&t.nodeType===Node.TEXT_NODE&&(t.textContent=t.textContent+" ")}})},adjustTranslationSpacesByNodequeueUuid:function(e){var t=[];for(var a in translate.nodeQueue[e].list)if(translate.nodeQueue[e].list.hasOwnProperty(a)&&!(a.length<1))for(var n in translate.nodeQueue[e].list[a])if(translate.nodeQueue[e].list[a].hasOwnProperty(n))for(var r in translate.nodeQueue[e].list[a][n].nodes)if(translate.nodeQueue[e].list[a][n].nodes.hasOwnProperty(r)){var s=translate.nodeQueue[e].list[a][n].nodes[r].node;t.push(s)}translate.visual.adjustTranslationSpaces(t)},adjustTranslationSpacesByLastNodequeueUuid:function(e){e="";for(var t in translate.nodeQueue){e=t;break}"string"==typeof e&&e.length>1&&translate.visual.adjustTranslationSpacesByNodequeueUuid(e)},hideText:{style:"\n\t\t\t\t/* 文本隐藏核心样式 - 仅隐藏文本内容 */\n\t\t        html.translatejs-text-hidden p, html.translatejs-text-hidden div,\n\t\t        html.translatejs-text-hidden h1, html.translatejs-text-hidden h2, html.translatejs-text-hidden h3,\n\t\t        html.translatejs-text-hidden h4, html.translatejs-text-hidden h5, html.translatejs-text-hidden h6,\n\t\t        html.translatejs-text-hidden span, html.translatejs-text-hidden a, html.translatejs-text-hidden b,\n\t\t        html.translatejs-text-hidden strong, html.translatejs-text-hidden i, html.translatejs-text-hidden em,\n\t\t        html.translatejs-text-hidden mark,\n\t\t        html.translatejs-text-hidden blockquote, html.translatejs-text-hidden ul, html.translatejs-text-hidden ol,\n\t\t        html.translatejs-text-hidden li, html.translatejs-text-hidden table, html.translatejs-text-hidden th,\n\t\t        html.translatejs-text-hidden td, html.translatejs-text-hidden label, html.translatejs-text-hidden button,\n\t\t        html.translatejs-text-hidden input, html.translatejs-text-hidden select, html.translatejs-text-hidden textarea {\n\t\t            color: transparent !important;\n\t\t            text-shadow: none !important;\n\t\t        }\n\n\t\t        /* 隐藏占位符文字 */\n\t\t        html.translatejs-text-hidden ::placeholder {\n\t\t            color: transparent !important;\n\t\t        }\n\n\t\t        /* 确保媒体元素不受影响 */\n\t\t        img, video, iframe, canvas, svg,\n\t\t        object, embed, picture, source {\n\t\t            color: initial !important;\n\t\t        }\n\n\t\t        /* 忽略隐藏的元素保持可见 */\n\t\t        .ignore-hidden {\n\t\t            color: inherit !important;\n\t\t        }\n\t\t\t",hide:function(e){const t=document.createElement("style");void 0===e||null==e||0==e.length?(e="translatejs-text-hidden",t.textContent=translate.visual.hideText.style):(e="translatejs-text-hidden-"+e,t.textContent=translate.visual.hideText.style.replace(/translatejs-text-hidden/g,e)),t.id=e,document.head.appendChild(t),document.documentElement.classList.add(e)},show:function(e){e=void 0===e||null==e||0==e.length?"translatejs-text-hidden":"translatejs-text-hidden-"+e,document.documentElement.classList.remove(e);var t=document.getElementById(e);null!=typeof t&&null!=t&&t.remove()}},webPageLoadTranslateBeforeHiddenText:function(){void 0===document.body||null==document.body||console.log("错误警告： translate.visual.webPageLoadTranslateBeforeHiddenText() 要在 head 标签中触发才能达到最好的效果！"),""==translate.language.local&&console.log("错误警告：在使用 translate.visual.webPageLoadTranslateBeforeHiddenText() 之前，请先手动设置你的本地语种，参考： http://translate.zvo.cn/4066.html  如果你不设置，则不管你是否有切换语言，网页打开后都会先短暂的不显示文字"),""!=translate.language.local&&translate.language.local==translate.language.getCurrent()||(translate.visual.hideText.hide(),translate.lifecycle.execute.translateNetworkBefore.push(function(e,t,a,n){void 0===translate.visual.hideText.first_translate_request_uuid&&(translate.visual.hideText.first_translate_request_uuid=e),translate.visual.hideText.first_translate_request_uuid==e&&(void 0===translate.visual.hideText.first_translate_request_number&&(translate.visual.hideText.first_translate_request_number=0),translate.visual.hideText.first_translate_request_number++)}),translate.lifecycle.execute.renderFinish.push(function(e,t){if(void 0===translate.visual.hideText.first_translate_request_uuid);else if(translate.visual.hideText.first_translate_request_uuid!=e)return;translate.visual.hideText.show()}))}}},nodeuuid={index:function(e){var t,a=e.parentElement;if(null==a)return"";if(void 0===e.tagName)t=a.childNodes;else{t=[];for(var n=a.childNodes,r=0;r<n.length;r++)n[r].tagName===e.tagName&&t.push(n[r])}var s=Array.prototype.indexOf.call(t,e);return e.nodeName+""+(s+1)},uuid:function(e){for(var t="",a=e;null!=a;){var n=nodeuuid.index(a);""!=n&&(""!=t&&(t="_"+t),t=n+t),a=a.parentElement}return t}};console.log("------ translate.js ------\nTwo lines of js html automatic translation, page without change, no language configuration file, no API Key, SEO friendly! Open warehouse : https://github.com/xnx3/translate \n两行js实现html全自动翻译。 无需改动页面、无语言配置文件、无API Key、对SEO友好！完全开源，代码仓库：https://gitee.com/mail_osc/translate"),function(e,t){"function"==typeof define&&define.amd?define([],()=>t()):"object"==typeof module&&module.exports?module.exports=t():e.translate=t()}(this,function(){return translate});
</script>
<style>
textarea{
	  width: 100%;
    height: 180px;
}
button{
	margin: 20px;
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
}
</style>

<textarea id="original">
{
  custom: {
    switchLanguage: '切换语言',
    readme: {
      description: 'layui.i18n.$t 是私有方法（未文档化），此处仅用于演示',
      hello: '你好',
    },
    form: {
      required: '验证必填项',
      phone: '验证手机号',
      email: '验证邮箱',
      date: '验证日期',
      select: '选择框',
      submit: '立即提交',
      reset: '重置',
      placeholder: '请输入'
    },
    toDateString: {
      meridiem: function (hours, minutes) {
        return hours < 12 ? 'AM' : 'PM';
      }
    }
  }
}
</textarea>	
<label>翻译源：</label>
<input type="text" id="host" name="host" value="https://giteeai.zvo.cn/" style="width:300px" />（这个可以默认即可无需改动）
<br/>

翻译为：
<span id="translate"></span>
<br/>

<button onclick="trans();">将js对象（或数组等）中的值翻译为英文</button>

<textarea id="result">

</textarea>	
<div>
	<h2>说明</h2>
	1. 它支持对 layui i18n 的语种配置文件进行整体翻译。<br/>
	2. 它有开源中国提供qwen3大模型算力支持，有<a href="https://gitee.com/mail_osc/translate" class="ignore">translate.js</a>提供翻译能力支持，免费开放给layui用户使用。 <br/>
	3. 它对以下字符不会进行翻译：
	<div id="not_translate"></div>
</div>

<script>
//设置不被翻译的文本
translate.ignore.text.push('layui\.i18n\.\$t');
translate.ignore.text.push('{format}');
translate.ignore.text.push('{name}');
translate.ignore.text.push('{length}');
translate.ignore.text.push('{total}');
translate.ignore.text.push('{statusName}');
translate.ignore.text.push('{statusCode}');
translate.ignore.text.push('{msg}');
translate.ignore.text.push('{fileType}');
translate.ignore.text.push('{size}');
translate.ignore.text.push('{days}');
translate.ignore.text.push('{hours}');
translate.ignore.text.push('{minutes}');

/**** 设置language.json 加载 ****/
//先设置默认语种，如果没有默认是英语
if(typeof(translate.storage.get('to')) == 'undefined' || translate.storage.get('to') == null || translate.storage.get('to') == ''){
	translate.storage.set('to','english');
}
translate.request.speedDetectionControl.setCurrentHost('https://giteeai.zvo.cn/');
//重写select切换语言点切换后触发动作 - 参考文档 https://translate.zvo.cn/4056.html
translate.selectLanguageTag.selectOnChange = function(event){
    var language = event.target.value;
    translate.storage.set('to',language);	//设置目标翻译语言
    //console.log('new language: '+language);
    //trans(language);
};
//渲染加载出select切换语言选择框
translate.selectLanguageTag.render();

function trans(){

	/**清除原本翻译接口，设置自定义的 翻译源 **/
	translate.request.speedDetectionControl.setCurrentHost(document.getElementById('host').value);

	/**进行翻译操作 **/
	document.getElementById('result').value = '翻译中...';
	translate.js.transString(document.getElementById('original').value,document.getElementById('translateSelectLanguage').value, function(obj){
		document.getElementById('result').value = translate.js.objToString(obj, 2);
	}, function(failureInfo){
		document.getElementById('result').value = '失败，失败原因：'+failureInfo;
	});
}

//底部的说明，不翻译的字符
function renderNotTranslateString(){
	var str = '';
	for(var i = 0; i < translate.ignore.text.length; i++){
		str += '<li>'+translate.ignore.text[i]+'</li>';
	}
	str += '<li>网址</li>';
	str += '<li>邮箱</li>';
	str += '<li>文件名</li>';
	document.getElementById('not_translate').innerHTML = '<ul>'+str+'</ul>';
}
renderNotTranslateString();
</script>

</body>
</html>